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
This commit is contained in:
modzilla99 2021-10-20 12:25:33 +02:00 committed by GitHub
parent 8c2a83d51e
commit 13a79b777c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

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