[GH-ISSUE #1459] [connect] Transferring from librespot to other device resets position #655

Open
opened 2026-02-27 19:31:47 +03:00 by kerem · 10 comments
Owner

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

  1. Start playing a song on a librespot instance
  2. Wait a few seconds/minutes or seek to a position
  3. Transfer playback to a standard Spotify device (such as desktop client or mobile app)
  4. Notice that song restarts from beginning

Log

https://logpaste.com/SfhbnW4p

Host (what you are running librespot on):

  • OS: Linux
  • Platform: x86
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 1. Start playing a song on a librespot instance 2. Wait a few seconds/minutes or seek to a position 3. Transfer playback to a standard Spotify device (such as desktop client or mobile app) 4. Notice that song restarts from beginning ### Log https://logpaste.com/SfhbnW4p ### Host (what you are running `librespot` on): - OS: Linux - Platform: x86
Author
Owner

@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.

<!-- gh-comment-id:2613938932 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2613940928 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2613941550 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2613955548 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2613975802 --> @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.
Author
Owner

@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

<!-- gh-comment-id:2613982602 --> @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
Author
Owner

@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.

<!-- gh-comment-id:2613996853 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2849359359 --> @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.
Author
Owner

@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)

<!-- gh-comment-id:2849364742 --> @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)
Author
Owner

@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 :)

<!-- gh-comment-id:2849378663 --> @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 :)
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/librespot#655
No description provided.