mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-10-12 17:10:45 +00:00
Fixed output of playlist_tracks example (#594)
Co-authored-by: Chris Danger <chris@The-Castle-Tower.local>
This commit is contained in:
1 parent
36b857dc15
commit
bea781d28f
2 files changed
+5
-4
No files matched your search
+1
-1
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- playlist_tracks example code no longer prints extra characters on final loop iteration
|
||||||
- SpotifyException now thrown when a request fails & has no response ( fixes #571, #581 )
|
- SpotifyException now thrown when a request fails & has no response ( fixes #571, #581 )
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ while True:
|
|||||||
offset=offset,
|
offset=offset,
|
||||||
fields='items.track.id,total',
|
fields='items.track.id,total',
|
||||||
additional_types=['track'])
|
additional_types=['track'])
|
||||||
pprint(response['items'])
|
|
||||||
offset = offset + len(response['items'])
|
|
||||||
print(offset, "/", response['total'])
|
|
||||||
|
|
||||||
if len(response['items']) == 0:
|
if len(response['items']) == 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
pprint(response['items'])
|
||||||
|
offset = offset + len(response['items'])
|
||||||
|
print(offset, "/", response['total'])
|
||||||
Reference in new issue
Block a user