mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[GH-ISSUE #825] When playing songs from Liked songs page: Cannot determine the current page's context #495
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#495
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wiraki on GitHub (Sep 4, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/825
Describe the bug
When I first go to Liked Songs (
g y) and start playing songs, if I navigate away (for example going to Artist page of the current song) and then useg Spaceto go back to current context, it fails to do bring me back to Liked Songs and saysCannot determine the current page's contextTo Reproduce
See description.
Expected behaviour
I would expect
g Spaceto bring me back to Liked Songs. Let me know if what I am seeing is the normal expected behavior.Log and backtrace
Let me know if a log is necessary (by the way, doesn't it include confidential tokens etc.?)
Backtrace is empty.
Environment
77af13b48b2a03e61fef1cffea899929057551dcstreaming,media-control,pulseaudio-backend,image,notify,fzf@aome510 commented on GitHub (Sep 5, 2025):
this is expected cause when you play from the Liked Tracks page, it just creates a tracks playback consisting of a subset of tracks there.
g spaceonly supports context playback, i.e. when you play from playlist/album@wiraki commented on GitHub (Sep 5, 2025):
Thanks for the fast reply!
I was not aware of that. Do I understand correctly that if I have liked e.g. 500 tracks, when I start playback from the Liked Tracks page it creates a subset of X tracks?
If that is correct:
I am sorry if this is documented somewhere, I tried to find it but I may have missed it. Feel free to just point me in the right direction.
@aome510 commented on GitHub (Sep 6, 2025):
Yes and it depends on the song that you start the playback with. The logic is defined in
github.com/aome510/spotify-player@77af13b48b/spotify_player/src/state/model.rs (L709-L719)in case you're interested. tldr, it will pick
tracks_playback_limit(default 50) songs around the start track to initiate the playback. If you increase this number too high, Spotify API will return an error.I'm not sure. If I start a liked tracks playback using official Spotify app, got this as a returned context
and it seems I can also use
spotify:user:31bewedqaetpovv3yqnw44jtphsy:collectionas acontext_urito start a playback in https://developer.spotify.com/documentation/web-api/reference/start-a-users-playback 🤔 even Spotify says it only supports artist/playlist/album as a context:Obviously,
rspotifyonly allows to use artist/playlist/album as a context: https://docs.rs/rspotify/latest/rspotify/clients/trait.OAuthClient.html#method.start_context_playbackThat said, I think it's definitely possible implement something in
spotify_playerto support liked tracks as a context@aome510 commented on GitHub (Sep 6, 2025):
fwiw, I do plan to improve the usability of
trackscontext inspotify_player(so thattracksplayback will show up in currently playing context page) so this liked-tracks integration will probably be included as part of the work@wiraki commented on GitHub (Sep 6, 2025):
Thanks for the details aome510, TIL !
I leave it up to you whether to close this issue or leave it open for future implementation.