Fixed output of playlist_tracks example (#594)

Co-authored-by: Chris Danger <chris@The-Castle-Tower.local>
This commit is contained in:
fathom9x 2020-10-23 12:35:16 -04:00 committed by GitHub
parent 36b857dc15
commit bea781d28f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### 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 )
### Changed

View File

@ -12,9 +12,10 @@ while True:
offset=offset,
fields='items.track.id,total',
additional_types=['track'])
pprint(response['items'])
offset = offset + len(response['items'])
print(offset, "/", response['total'])
if len(response['items']) == 0:
break
pprint(response['items'])
offset = offset + len(response['items'])
print(offset, "/", response['total'])