mirror of
https://github.com/cooperhammond/irs.git
synced 2025-01-25 07:00:58 +00:00
correct system exit
This commit is contained in:
parent
74a001ba24
commit
dc596c59a7
|
@ -9,7 +9,7 @@ def parse_config():
|
||||||
|
|
||||||
home = os.environ.get("HOME") or os.path.expanduser("~/")
|
home = os.environ.get("HOME") or os.path.expanduser("~/")
|
||||||
|
|
||||||
check_for_and_set("irs_config_dir", home + "/.irs", None)
|
check_for_and_set("irs_config_dir", home + "/.irs", ".irs/")
|
||||||
|
|
||||||
check_for = [home + "/.irs/config.yml", home + "/.irs/bin/ffmpeg",
|
check_for = [home + "/.irs/config.yml", home + "/.irs/bin/ffmpeg",
|
||||||
home + "/.irs/bin/ffprobe"]
|
home + "/.irs/bin/ffprobe"]
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import sys
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
from ..search import spotify
|
from ..search import spotify
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import errno
|
import errno
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import spotipy
|
import spotipy
|
||||||
|
@ -46,7 +47,8 @@ class SpotifySearcher(object):
|
||||||
return self.find_song(song_title, artist_name,
|
return self.find_song(song_title, artist_name,
|
||||||
offset=offset + limit)
|
offset=offset + limit)
|
||||||
else:
|
else:
|
||||||
print("There were no songs found by that name with that artist")
|
print("There were no songs found by that name with that artist.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def find_album(self, album_title, artist_name=None, limit=50, offset=0):
|
def find_album(self, album_title, artist_name=None, limit=50, offset=0):
|
||||||
"""Searches spotify for an album and grabs its contents and metadata
|
"""Searches spotify for an album and grabs its contents and metadata
|
||||||
|
@ -67,7 +69,8 @@ class SpotifySearcher(object):
|
||||||
return self.find_album(album_title, artist_name,
|
return self.find_album(album_title, artist_name,
|
||||||
offset=offset + limit)
|
offset=offset + limit)
|
||||||
else:
|
else:
|
||||||
print("There were no albums found by that name with that artist")
|
print("There were no albums found by that name with that artist.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def find_playlist(self, playlist_title, username, limit=50, offset=0):
|
def find_playlist(self, playlist_title, username, limit=50, offset=0):
|
||||||
"""Searches spotify for a playlist and grabs its contents and metadata
|
"""Searches spotify for a playlist and grabs its contents and metadata
|
||||||
|
@ -87,6 +90,7 @@ class SpotifySearcher(object):
|
||||||
offset=offset + limit)
|
offset=offset + limit)
|
||||||
else:
|
else:
|
||||||
print("There were no playlists by that name found.")
|
print("There were no playlists by that name found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
def artist(self, artist_uri):
|
def artist(self, artist_uri):
|
||||||
"""Gets artist metadata from uri
|
"""Gets artist metadata from uri
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'irs',
|
name = 'irs',
|
||||||
version = '7.0.1',
|
version = '7.0.2',
|
||||||
description = 'A music downloader that gets metadata too.',
|
description = 'A music downloader that gets metadata too.',
|
||||||
url = 'https://github.com/kepoorhampond/irs',
|
url = 'https://github.com/kepoorhampond/irs',
|
||||||
author = 'Kepoor Hampond',
|
author = 'Kepoor Hampond',
|
||||||
|
|
Loading…
Reference in a new issue