Fix error when playlist not found

This commit is contained in:
ritiek
2017-11-11 19:17:10 +05:30
parent fd130f8626
commit 0deea6b384

View File

@@ -342,6 +342,7 @@ def grab_playlist(playlist):
username = splits[-3] username = splits[-3]
playlist_id = splits[-1] playlist_id = splits[-1]
playlists = spotify.user_playlists(username) playlists = spotify.user_playlists(username)
found = False
while True: while True:
for playlist in playlists['items']: for playlist in playlists['items']:
@@ -353,7 +354,6 @@ def grab_playlist(playlist):
if playlists['next']: if playlists['next']:
playlists = spotify.next(playlists) playlists = spotify.next(playlists)
else: else:
found = False
break break
if found: if found: