Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[connect] Transferring from librespot to other device resets position #1459

Open
FabioGNR opened this issue Jan 25, 2025 · 7 comments
Open
Labels

Comments

@FabioGNR
Copy link
Contributor

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
@FabioGNR FabioGNR added the bug label Jan 25, 2025
@FabioGNR
Copy link
Contributor Author

FabioGNR commented 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.

@librespot-org librespot-org deleted a comment Jan 25, 2025
@photovoltex
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Member

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
Copy link
Contributor Author

FabioGNR commented 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
Copy link
Contributor Author

Here's a recording showing the reset:

2025-01-25-14.23.20.388184683.mp4

Here's a recording showing proper resume:

2025-01-25-14.20.42.924485102.mp4

@photovoltex
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants