mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 16:25:52 +03:00
[GH-ISSUE #1459] [connect] Transferring from librespot to other device resets position #655
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#655
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 @FabioGNR on GitHub (Jan 25, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1459
Description
When I am playing a track on a librespot instance and want to transfer it to another device (e.g. desktop client) the track starts playing from the beginning again, instead of resuming at same position.
Version
librespot 0.6.0-dev 98e9703 (Built on 2025-01-25, Build ID: 3SEKFch1, Profile: debug)How to reproduce
Log
https://logpaste.com/SfhbnW4p
Host (what you are running
librespoton):@FabioGNR commented on GitHub (Jan 25, 2025):
Something I just found out, after transferring back to desktop client and waiting for song to complete the next song will start at the intended timestamp.
So playing song $1 on librespot, transfer to desktop, song $1 plays from beginning.
Song $2 loads and starts playing at the original position of song $1.
@photovoltex commented on GitHub (Jan 25, 2025):
Did you check against the official clients how they behave on transfer? That might be a limitation from the clients, even tho the later described behavior is quite weird.
@FabioGNR commented on GitHub (Jan 25, 2025):
Yes, the official apps resume at the same position. I only have this issue when transferring from librespot, so maybe some information isn't correctly synced to other clients.
@photovoltex commented on GitHub (Jan 25, 2025):
Okay, good to know. I think I quickly tried to do it from the web player to the desktop client and it didn't seem to work. So maybe that was just a coincidence, or maybe the web player behave different again.
Anyhow, can you try to update the volume (wait around 2-3s) before transferring to an official client? That should definitely update the position. So maybe it's just missing the position update after 30 seconds that is usually send by the official clients.
@FabioGNR commented on GitHub (Jan 25, 2025):
Hmm yeah this is strange. I tried the web player and first time it worked fine, but afterwards I have the same issue for all devices. To clarify, I was using Desktop client (linux) and Android client before.
After this any combination of devices restarted the song, however then I skipped to the next song and it works properly again, even on the web player.
However, going from librespot back to another client still resets the song.
With the volume trick it seems to still be resetting, even though I did see the "update position to 2:02.." message.
@FabioGNR commented on GitHub (Jan 25, 2025):
Here's a recording showing the reset:
https://github.com/user-attachments/assets/3e44d805-6f56-4208-b7f3-b90b5b4c75a6
Here's a recording showing proper resume:
https://github.com/user-attachments/assets/0349dbf2-c446-47be-9389-4ddb127d8686
@photovoltex commented on GitHub (Jan 25, 2025):
Thanks for all the additional info :). To fix this we might probably need some tinkering with the data send to the server. So might take a while until this gets fixed.
@photovoltex commented on GitHub (May 4, 2025):
Just looked into this issue again. I usually test with the web-player and when transferring from librespot to the web-player it transfers correct, but when transferring to the desktop or mobile client it does seem to transfer with an incorrect state.
@photovoltex commented on GitHub (May 4, 2025):
Additionally it seems to only affect the liked songs? I couldn't reproduce the issue with the reset of the position in a playlist (had 3 tracks for easier inspection of the send state)
@photovoltex commented on GitHub (May 4, 2025):
So I did try to adjust some metrics and parameters that didn't quite match the state that the web or desktop player send, but it didn't seem to fix the issue.
Additionally I also noticed that it seems to not only affect the position, but also the index. The currently played track carries over correctly (except the position), but the next track will be the first track of the liked songs instead of the expected following track.
I currently don't have the time to look much further into the topic. Will try to do so if the time gives a bit more room :)