[GH-ISSUE #297] Shuffle doesn't shuffle through all songs in a list #158

Closed
opened 2026-03-02 23:45:05 +03:00 by kerem · 2 comments
Owner

Originally created by @Marcos-Fidelis on GitHub (Nov 25, 2023).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/297

(I'm filling this with the suggested fields)

Shuffle function only shuffles through groups of 50 songs at a time, often in a loop of under 20 songs.
Like if I set it to shuffle in song number 6 it will select songs from 1-50, if I select song number 60 it will shuffle through songs 51-100. It will often repeat before hitting half of them.

All I did to trigger this was set my liked tracks to shuffle

I expected that settigns shuffle to on it would shuffle through all my songs

can't offer a log, could offer a screen recording of my skipping through the songs and only the same group of songs flashing if you'd like, but it'd be just as is described, it only shuffles through blocks of 50.

  • OS: ArcoLinux (Arch based)
  • Application version: aur/spotify-player-full-git 0.14.1.r0.g77727a4-1

Additional context:
I have a lot of songs (1430) in my liked tracks list and that may be causing some issue.
I am also connecting to a spotify application, not a device on a secondary open app

Originally created by @Marcos-Fidelis on GitHub (Nov 25, 2023). Original GitHub issue: https://github.com/aome510/spotify-player/issues/297 (I'm filling this with the suggested fields) Shuffle function only shuffles through groups of 50 songs at a time, often in a loop of under 20 songs. Like if I set it to shuffle in song number 6 it will select songs from 1-50, if I select song number 60 it will shuffle through songs 51-100. It will often repeat before hitting half of them. All I did to trigger this was set my liked tracks to shuffle I expected that settigns shuffle to on it would shuffle through all my songs can't offer a log, could offer a screen recording of my skipping through the songs and only the same group of songs flashing if you'd like, but it'd be just as is described, it only shuffles through blocks of 50. - OS: ArcoLinux (Arch based) - Application version: aur/spotify-player-full-git 0.14.1.r0.g77727a4-1 Additional context: I have a lot of songs (1430) in my liked tracks list and that may be causing some issue. I am also connecting to a spotify application, not a device on a secondary open app
kerem 2026-03-02 23:45:05 +03:00
Author
Owner

@aome510 commented on GitHub (Nov 28, 2023):

Shuffle function only shuffles through groups of 50 songs at a time, often in a loop of under 20 songs.

I remembered encountering this kind of 20-song looping behaviour before when playing songs at the beginning of a large playlist. Will not see this looping behaviour if playing songs at the middle of the playlist or at the end. My guess is that the third-party library spotify_player uses for streaming has an optimization to only loads songs if needed.

FYI, I normally use PlayRandom to start a new playback with a random entry song when the current playback feels too "repeat".

Like if I set it to shuffle in song number 6 it will select songs from 1-50, if I select song number 60 it will shuffle through songs 51-100. It will often repeat before hitting half of them.

If you start a playback inside the liked tracks page, there is a configurable limit tracks_playback_limit (default=50) as in https://github.com/aome510/spotify-player/blob/master/docs/config.md#general on number of tracks in that playback. To provide some context, to start a tracks playback via Spotify APIs, you'll need to specify all the tracks' IDs inside the request URL. Because Spotify has a length limit on the request URL, there is a limit for # of tracks inside a tracks playback.

You can configure tracks_playback_limit to a bigger value, e.g 300-500, but something big like 1000 will not work.

<!-- gh-comment-id:1830641381 --> @aome510 commented on GitHub (Nov 28, 2023): > Shuffle function only shuffles through groups of 50 songs at a time, often in a loop of under 20 songs. I remembered encountering this kind of 20-song looping behaviour before when playing songs **at the beginning** of a large playlist. Will not see this looping behaviour if playing songs at the middle of the playlist or at the end. My guess is that [the third-party library](https://github.com/librespot-org/librespot) `spotify_player` uses for streaming has an optimization to only loads songs if needed. FYI, I normally use `PlayRandom` to start a new playback with a random entry song when the current playback feels too "repeat". > Like if I set it to shuffle in song number 6 it will select songs from 1-50, if I select song number 60 it will shuffle through songs 51-100. It will often repeat before hitting half of them. If you start a playback inside the liked tracks page, there is a configurable limit `tracks_playback_limit` (default=50) as in https://github.com/aome510/spotify-player/blob/master/docs/config.md#general on number of tracks in that playback. To provide some context, to start a `tracks` playback via Spotify APIs, you'll need to specify all the tracks' IDs inside the request URL. Because Spotify has a length limit on the request URL, there is a limit for # of tracks inside a `tracks` playback. You can configure `tracks_playback_limit` to a bigger value, e.g `300-500`, but something big like `1000` will not work.
Author
Owner

@aome510 commented on GitHub (Nov 29, 2023):

My guess is that the third-party library spotify_player uses for streaming has an optimization to only loads songs if needed.

It's actually a bug of the library: https://github.com/librespot-org/librespot/issues/442. Unfortunately, nothing can be done from spotify_player side.

<!-- gh-comment-id:1831120416 --> @aome510 commented on GitHub (Nov 29, 2023): > My guess is that [the third-party library](https://github.com/librespot-org/librespot) spotify_player uses for streaming has an optimization to only loads songs if needed. It's actually a bug of the library: https://github.com/librespot-org/librespot/issues/442. Unfortunately, nothing can be done from `spotify_player` side.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#158
No description provided.