Describe the bug
Liking with the keybinding always acts on current_playback_context.item, whatever is actually playing. Starting a local, Subsonic or YouTube file only pauses librespot and never clears the Spotify context, so the context still holds the last Spotify track from earlier in the session. Pressing Shift+W while a local file is playing saves that old Spotify track to your library. Nothing on screen shows it happened.
The same applies while the native queue owns playback, where the context holds the suspended track rather than the queued one you are hearing.
To Reproduce
- Build with
--features all-sources.
- Play any Spotify track, then stop it.
- Play a local file.
- Press Shift+W.
- Check your Liked Songs. The Spotify track from step 2 is now saved. The local file is not, and has no Spotify id to save anyway.
Expected behavior
Like should act on the track you are listening to, or do nothing and say so when the source has no Spotify id to save.
Root cause
toggle_like_currently_playing_item (src/tui/handlers/playbar.rs:47) reads current_playback_context with no check for which source owns playback. #373 dropped the Like button from the playbar for decoded sources and the queue slot, so the mouse path is covered now, but the keybinding still goes straight through.
Additional context
Found while reviewing #373. Predates it.
Describe the bug
Liking with the keybinding always acts on
current_playback_context.item, whatever is actually playing. Starting a local, Subsonic or YouTube file only pauses librespot and never clears the Spotify context, so the context still holds the last Spotify track from earlier in the session. Pressing Shift+W while a local file is playing saves that old Spotify track to your library. Nothing on screen shows it happened.The same applies while the native queue owns playback, where the context holds the suspended track rather than the queued one you are hearing.
To Reproduce
--features all-sources.Expected behavior
Like should act on the track you are listening to, or do nothing and say so when the source has no Spotify id to save.
Root cause
toggle_like_currently_playing_item(src/tui/handlers/playbar.rs:47) readscurrent_playback_contextwith no check for which source owns playback. #373 dropped the Like button from the playbar for decoded sources and the queue slot, so the mouse path is covered now, but the keybinding still goes straight through.Additional context
Found while reviewing #373. Predates it.