mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2026-02-09 10:59:27 +00:00
Fetches all user playlists now (was limited to 50)
This commit is contained in:
15
spotdl.py
15
spotdl.py
@@ -119,10 +119,15 @@ def feed_playlist(username):
|
|||||||
links = []
|
links = []
|
||||||
check = 1
|
check = 1
|
||||||
# iterate over user playlists
|
# iterate over user playlists
|
||||||
for playlist in playlists['items']:
|
while True:
|
||||||
print(str(check) + '. ' + misc.fix_encoding(playlist['name']) + ' (' + str(playlist['tracks']['total']) + ' tracks)')
|
for playlist in playlists['items']:
|
||||||
links.append(playlist)
|
print(str(check) + '. ' + misc.fix_encoding(playlist['name']) + ' (' + str(playlist['tracks']['total']) + ' tracks)')
|
||||||
check += 1
|
links.append(playlist)
|
||||||
|
check += 1
|
||||||
|
if playlists['next']:
|
||||||
|
playlists = spotify.next(playlists)
|
||||||
|
else:
|
||||||
|
break
|
||||||
print('')
|
print('')
|
||||||
# let user select playlist
|
# let user select playlist
|
||||||
playlist = misc.input_link(links)
|
playlist = misc.input_link(links)
|
||||||
@@ -285,4 +290,4 @@ if __name__ == '__main__':
|
|||||||
elif args.list:
|
elif args.list:
|
||||||
grab_list(file=args.list)
|
grab_list(file=args.list)
|
||||||
elif args.username:
|
elif args.username:
|
||||||
feed_playlist(username=args.username)
|
feed_playlist(username=args.username)
|
||||||
|
|||||||
Reference in New Issue
Block a user