[GH-ISSUE #107] Transferring playback to go-librespot doesn't always work #72

Closed
opened 2026-02-28 14:25:07 +03:00 by kerem · 2 comments
Owner

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.

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.
kerem 2026-02-28 14:25:07 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

<!-- gh-comment-id:2385680039 --> @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: https://github.com/librespot-org/librespot-java/blob/d0ff31b4f476590c9c17401aac01a6762e4ba908/player/src/main/java/xyz/gianlu/librespot/player/state/DeviceStateHandler.java#L174-L176
Author
Owner

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

<!-- gh-comment-id:2402228600 --> @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.
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/go-librespot#72
No description provided.