Fixed output of playlist_tracks example (#594)

Co-authored-by: Chris Danger <chris@The-Castle-Tower.local>
This commit is contained in:
fathom9xandChris Danger authored and GitHub committed 2020-10-23 17:35:16 +01:00
1 parent 36b857dc15
commit bea781d28f
2 files changed
+6 -5

No files matched your search

+1 -1
View File
@@ -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
+5 -4
View File
@@ -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'])