diff --git a/irs/cli/config_parser.py b/irs/cli/config_parser.py index 481369e..6104591 100644 --- a/irs/cli/config_parser.py +++ b/irs/cli/config_parser.py @@ -9,7 +9,7 @@ def parse_config(): 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", home + "/.irs/bin/ffprobe"] diff --git a/irs/glue/list.py b/irs/glue/list.py index 1c730c0..b7f9a7b 100644 --- a/irs/glue/list.py +++ b/irs/glue/list.py @@ -1,3 +1,4 @@ +import sys import abc from ..search import spotify diff --git a/irs/glue/song.py b/irs/glue/song.py index ca8f0e6..1486a2f 100644 --- a/irs/glue/song.py +++ b/irs/glue/song.py @@ -1,4 +1,5 @@ import os +import sys import errno import string diff --git a/irs/search/spotify.py b/irs/search/spotify.py index 8628c53..742ea9f 100644 --- a/irs/search/spotify.py +++ b/irs/search/spotify.py @@ -1,4 +1,5 @@ import os +import sys import re import spotipy @@ -46,7 +47,8 @@ class SpotifySearcher(object): return self.find_song(song_title, artist_name, offset=offset + limit) 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): """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, offset=offset + limit) 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): """Searches spotify for a playlist and grabs its contents and metadata @@ -87,6 +90,7 @@ class SpotifySearcher(object): offset=offset + limit) else: print("There were no playlists by that name found.") + sys.exit(1) def artist(self, artist_uri): """Gets artist metadata from uri diff --git a/setup.py b/setup.py index 34cc226..05a66af 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name = 'irs', - version = '7.0.1', + version = '7.0.2', description = 'A music downloader that gets metadata too.', url = 'https://github.com/kepoorhampond/irs', author = 'Kepoor Hampond',