mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-10-11 01:10:45 +00:00
Use the playlist_items function to retrieve tracks.
* It will request the same endpoint as sp.next with the same fields for consistency.
This commit is contained in:
1 parent
a14a28e10c
commit
97c9917a02
2 files changed
+2
-2
No files matched your search
@@ -25,8 +25,7 @@ if __name__ == '__main__':
|
||||
print(playlist['name'])
|
||||
print(' total tracks', playlist['tracks']['total'])
|
||||
|
||||
results = sp.playlist(playlist['id'], fields="tracks,next")
|
||||
tracks = results['tracks']
|
||||
tracks = sp.playlist_items(playlist['id'], fields="items,next", additional_types=('tracks', ))
|
||||
show_tracks(tracks)
|
||||
|
||||
while tracks['next']:
|
||||
|
||||
Reference in new issue
Block a user