Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset Glitch #1084

Open
ZachEkstrand opened this issue Apr 7, 2024 · 2 comments
Open

Offset Glitch #1084

ZachEkstrand opened this issue Apr 7, 2024 · 2 comments
Labels

Comments

@ZachEkstrand
Copy link

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
42. Emo
43. Bren Lukens
44. Jake Ewald
45. Jesse Lacey
46. Summer
47. Kevin Parker
48. Love Songs
49. The Strokes

Environment:

  • OS: Windows 10
  • Python 3.12.1
  • spotipy version 2.23.0
  • Visual Studio Code
@dieser-niko
Copy link
Member

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
Copy link
Member

Any updates so far?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants