spotify-player
spotify-player copied to clipboard
Failing to start playing with a large number of tracks
Hi, I have been having an small issue with spotify-player. For some reason when I hit play in my liked tracks nothing plays at all. However if I was already playing the liked tracks playlist in some other device, like my phone, and then just change to spotify-player, the playlist continue without any hitch, which is the roundabout I have been using.
Here is the log:
Hi @mariabug. Thanks for reporting. Judging from the log, it seems like the app couldn't start a playback [1] with too many tracks:
...
TrackId("4V5PtBjMHOZBpXR3Po3Hiv")], Some(Uri("spotify:track:55McbqAUspPoavubDJxryF")))))}:
spotify_player::client::handlers:
Failed to handle client request: http error: status code 413 Payload Too Large
I'm not so sure how the official app handles this, maybe it uses an internal API different from what's exposed to the public. I'll think about implementing a hack to handle this case.
[1]: https://developer.spotify.com/documentation/web-api/reference/#/operations/start-a-users-playback
Hey, just wanna say I'm experiencing the same thing.
If you really wanna listen to your liked songs, I've found a way to do it.
- Start playing a random song on the terminal
- Open Spotify on your phone
- Use your phone as a controller for the session running in the terminal
- Navigate to you liked songs on the phone and start playing them!
Trying to see the songs context won't work tho
If you really wanna listen to your liked songs, I've found a way to do it.
- Start playing a random song on the terminal
- Open Spotify on your phone
- Use your phone as a controller for the session running in the terminal
- Navigate to you liked songs on the phone and start playing them!
Yeah, currently it's the only workaround to start liked song playback (with a large number of songs).
Trying to see the songs context won't work tho
Official Spotify client seems to implement a custom playback context for liked songs. So using the get_context
API to show the playing context won't work. This is similar to their queue playback context, e.g no public API to access.
One way to resolve this issue is actually implementing a custom context like Spotify did. However, it will be quite complicated, and I don't have much time to support that now. Contributions are welcome though 💪
In the meantime, hope that the above workaround is good enough
I am also dealing with this issue.
Is there no way to limit the number of track ids to the tracks that are visible in the ui or something similar? perhaps just limit track ids to a number with each scroll?
@alexseitsinger @mariabug @Rinkerbel, sorry for the delay. This issue should be fixed in https://github.com/aome510/spotify-player/releases/tag/v0.10.0. Feel free to reopen this issue if encounter any related issues.
I implemented the fix by restricting the number of tracks playing, e.g only play 200 tracks surround the selected track when starting a new playback.