From 13a79b777cbf749dbedeca6892f1a6567b57acdf Mon Sep 17 00:00:00 2001 From: modzilla99 <32171364+modzilla99@users.noreply.github.com> Date: Wed, 20 Oct 2021 12:25:33 +0200 Subject: [PATCH] Check if Name of Song is set If the Name is not set, the download will fail. With this change the Download will continue and a Error message will show that the Song does not exist anymore --- zspotify.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zspotify.py b/zspotify.py index 0cddaf03..1acc55fc 100644 --- a/zspotify.py +++ b/zspotify.py @@ -105,7 +105,10 @@ def client(): download_from_user_playlist() elif sys.argv[1] == "-ls" or sys.argv[1] == "--liked-songs": for song in get_saved_tracks(token): - download_track(song['track']['id'], "Liked Songs/") + if not song['track']['name']: + print("### SKIPPING: SONG DOES NOT EXISTS ON SPOTIFY ANYMORE ###") + else: + download_track(song['track']['id'], "Liked Songs/") print("\n") else: track_uri_search = re.search(