mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #107] Transferring playback to go-librespot doesn't always work #72
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#72
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 @aykevl on GitHub (Oct 1, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/107
I found that transferring playback to go-librespot doesn't always work.
Sometimes it switches back to the previous player. Other times the previous player becomes unresponsive, and only switching back and forth again fixes it.
It appears that this happens only when transferring playback after playback was transferred successfully before. So if it fails, switching to a different player and to go-librespot again typically works.
See: https://github.com/devgianlu/go-librespot/pull/106#discussion_r1782429113
I think the core issue is that the cluster update (
hm://connect-state/v1/cluster) and the "transfer" player command (hm://connect-state/v1/player/command) are sometimes reversed so that the cluster update of the previous device comes after the transfer player command.@devgianlu commented on GitHub (Oct 1, 2024):
I have experienced this bug myself too and it has always been kind of a problem. My previous attempt at fixing this with librespot-java was this:
github.com/librespot-org/librespot-java@d0ff31b4f4/player/src/main/java/xyz/gianlu/librespot/player/state/DeviceStateHandler.java (L174-L176)@aykevl commented on GitHub (Oct 9, 2024):
Sadly this doesn't seem to fix the bug entirely, though it is a whole lot better. I still sometimes get "bounced" after connecting to go-librespot.