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
|
# iterate over user playlists
|
||||||
while True:
|
while True:
|
||||||
for playlist in playlists['items']:
|
for playlist in playlists['items']:
|
||||||
print(str(check) + '. ' + misc.fix_encoding(playlist['name']) + ' (' + str(playlist['tracks']['total']) + ' tracks)')
|
# In rare cases, playlists may not be found, so playlists['next'] is
|
||||||
links.append(playlist)
|
# None. Skip these. Also see Issue #91.
|
||||||
check += 1
|
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']:
|
if playlists['next']:
|
||||||
playlists = spotify.next(playlists)
|
playlists = spotify.next(playlists)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user