Deezer API doesn't return all items in large collections
hithomasmorelli opened this issue · 2 comments
hithomasmorelli commented
It does, however, provide a next
API url to get more items, which will then provide another next
url, and so on until all the tracks have been fetched.
Unsure if this also applies to other methods but will test.
I'll introduce a PR to fix this (by following the next
URLs when they're present)
Example response (for a playlist):
{
'data': [<tracks>],
'checksum': '<checksum>',
'total': <total>,
'next': 'https://api.deezer.com/playlist/<playlist>/tracks?access_token=<token>&index=<index>'
}
Methods found that problem applies to:
tracks
fans
(but the Deezer API limits this to 100 anyway at time of writing)albums
(foruser\<user>\albums
andartist\<artist>\albums
artists
(foruser\<user>\artists
)playlists
(foruser\<user>\playlists
)
Changed the issue from being about "tracks" to "items" once I discovered that it applied to more than just playlists
hithomasmorelli commented
Closing as missed iter_*
functions, pagination could potentially be improved, but that's a different issue
browniebroke commented
See more details in #137 for a longer term solution.