mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[PR #108] [MERGED] fix: only stop playback with new cluster updates #211
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#211
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?
📋 Pull Request Information
Original PR: https://github.com/devgianlu/go-librespot/pull/108
Author: @aykevl
Created: 10/1/2024
Status: ✅ Merged
Merged: 10/3/2024
Merged by: @devgianlu
Base:
master← Head:fix-stop-on-transfer📝 Commits (1)
ece2e85fix: only stop playback with new cluster updates📊 Changes
3 files changed (+35 additions, -3 deletions)
View changed files
📝
cmd/daemon/controls.go(+5 -1)📝
cmd/daemon/player.go(+8 -1)📝
cmd/daemon/state.go(+22 -1)📄 Description
Sometimes the dealer sends a cluster update with active_device_id still set to the old device ID right after sending a transfer command. This would result in the player thinking it was switching away so would need to stop, even though that's an old message.
This fix looks at the timestamp of the last transfer. It only assumes another player has taken over when the cluster update timestamp is newer than the last transfer timestamp.
This fixes https://github.com/devgianlu/go-librespot/issues/107.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.