mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Update spotdl.py
This commit is contained in:
@@ -114,14 +114,14 @@ def grab_playlist(playlist):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
# Wrong format, in either case
|
# Wrong format, in either case
|
||||||
log.error('The provided playlist URL is not in a recognized format!')
|
log.error('The provided playlist URL is not in a recognized format!')
|
||||||
sys.exit(1)
|
sys.exit(10)
|
||||||
playlist_id = splits[-1]
|
playlist_id = splits[-1]
|
||||||
try:
|
try:
|
||||||
spotify_tools.write_playlist(username, playlist_id)
|
spotify_tools.write_playlist(username, playlist_id)
|
||||||
except spotipy.client.SpotifyException:
|
except spotipy.client.SpotifyException:
|
||||||
log.error('Unable to find playlist')
|
log.error('Unable to find playlist')
|
||||||
log.info('Make sure the playlist is set to publicly visible and then try again')
|
log.info('Make sure the playlist is set to publicly visible and then try again')
|
||||||
sys.exit(1)
|
sys.exit(11)
|
||||||
|
|
||||||
|
|
||||||
def grab_single(raw_song, number=None):
|
def grab_single(raw_song, number=None):
|
||||||
@@ -219,4 +219,4 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
except KeyboardInterrupt as e:
|
except KeyboardInterrupt as e:
|
||||||
log.exception(e)
|
log.exception(e)
|
||||||
sys.exit(1)
|
sys.exit(3)
|
||||||
|
|||||||
Reference in New Issue
Block a user