correct system exit

This commit is contained in:
Cooper Hammond 2019-05-29 09:58:26 -07:00
parent 8482a1e2bb
commit c4ff915ff2
5 changed files with 10 additions and 4 deletions

View file

@ -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"]

View file

@ -1,3 +1,4 @@
import sys
import abc
from ..search import spotify

View file

@ -1,4 +1,5 @@
import os
import sys
import errno
import string

View file

@ -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

View file

@ -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',