spotipy-dev / spotipy

A light weight Python library for the Spotify Web API
http://spotipy.readthedocs.org
MIT License
4.9k stars 954 forks source link

Offset Glitch #1084

Open ZachEkstrand opened 3 months ago

ZachEkstrand commented 3 months ago

Describe the bug Setting the "offset" arg in the method "current_user_playlists" does not return the list of playlists starting at the correct index. Giving "offset" the value 42 will start the list at index 42 as expected, however giving "offset" the value 43 will oddly return the list starting at index 42. Any greater number will make it start at the index 1 before.

Your code This block of code with offset set to 43 has the exact same output:

offset = 42
chunk = sp.current_user_playlists(offset=offset)['items']
for playlist in chunk:
       print(playlist['name'])

Expected behavior current_users_playlists() should start at the correct offset

Output

  1. Emo
  2. Bren Lukens
  3. Jake Ewald
  4. Jesse Lacey
  5. Summer
  6. Kevin Parker
  7. Love Songs
  8. The Strokes

Environment:

dieser-niko commented 2 months ago

It seems to be a problem with the API rather than the library. You could try using the Spotify Web API documentation to check if it's an API issue.

I can't replicate it for myself as I don't have that many playlists in my library.

dieser-niko commented 1 month ago

Any updates so far?