From fd130f862647f41d0ae99457acab331174eeb676 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Sat, 11 Nov 2017 19:13:37 +0530 Subject: [PATCH] Error out if playlist not found --- spotdl.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spotdl.py b/spotdl.py index baa67ba..e18f004 100755 --- a/spotdl.py +++ b/spotdl.py @@ -348,13 +348,19 @@ def grab_playlist(playlist): if not playlist['name'] == None: if playlist['id'] == playlist_id: playlists['next'] = None + found = True break if playlists['next']: playlists = spotify.next(playlists) else: + found = False break - write_playlist(playlist) + if found: + write_playlist(playlist) + else: + print('Unable to find playlist') + print('Make sure the playlist is set to publicly visible and then try again') def grab_album(album):