mirror of
https://github.com/cooperhammond/irs.git
synced 2024-12-22 17:35:28 +00:00
correct system exit
This commit is contained in:
parent
8482a1e2bb
commit
c4ff915ff2
|
@ -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"]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import sys
|
||||
import abc
|
||||
|
||||
from ..search import spotify
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import sys
|
||||
import errno
|
||||
import string
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue