mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 08:35:49 +03:00
[GH-ISSUE #203] Track limit in user_playlists? #103
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#103
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DylanMeeus on GitHub (Jul 19, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/203
Hello,
It seems like I only get 100 tracks from playlists of a user when using the following line:
self.spotify.user_playlist(self.username, playlist['id'],fields="tracks,next")The API does not mention setting a limit. Is that something that could limit that request?
(if you want to see the full code, it is here: full code)
EDIT:
It seems like there is a method
user_playlist_trackswhich should do what I want to. I was following an example from the 'readthedocs' page though. Which misguided me a bit.Nontheless, it is interesting that it is capped at 100 and that you can not change that. Maybe worth looking into anyway.
@wesleybratt commented on GitHub (Sep 11, 2017):
I know inserting into playlists is capped at 100, I'll try and verify this.
@wesleybratt commented on GitHub (Sep 11, 2017):
Your totally right, only brings back 100.
@gwynnebaer commented on GitHub (Sep 18, 2017):
Spotify itself sets the 100 track limit for input/output. It's not easy to find this information, but it's listed here: https://developer.spotify.com/web-api/get-playlists-tracks/ (look for the "limit" field).
To get a full listing of tracks in a playlist, one must loop through the list using the "next" set of tracks. The file in the distribution named "user_playlists_contents.py" has an example of how to do this.
@stephanebruckert commented on GitHub (Jan 1, 2020):
Thanks @gwynnebaer