mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Add check for nonexistent playlists showing up for some reason (#92)
This commit is contained in:
committed by
Ritiek Malhotra
parent
2868c6f29f
commit
4132e414c4
@@ -121,9 +121,12 @@ def feed_playlist(username):
|
||||
# iterate over user playlists
|
||||
while True:
|
||||
for playlist in playlists['items']:
|
||||
print(str(check) + '. ' + misc.fix_encoding(playlist['name']) + ' (' + str(playlist['tracks']['total']) + ' tracks)')
|
||||
links.append(playlist)
|
||||
check += 1
|
||||
# In rare cases, playlists may not be found, so playlists['next'] is
|
||||
# None. Skip these. Also see Issue #91.
|
||||
if playlist['name'] is not None:
|
||||
print(str(check) + '. ' + misc.fix_encoding(playlist['name']) + ' (' + str(playlist['tracks']['total']) + ' tracks)')
|
||||
links.append(playlist)
|
||||
check += 1
|
||||
if playlists['next']:
|
||||
playlists = spotify.next(playlists)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user