Skip to content

refactor: Get playback status and metadata from one subscription - #177

Open
abusch wants to merge 1 commit into
mainfrom
playback-extended
Open

abusch wants to merge 1 commit into
mainfrom
playback-extended

Conversation

@abusch

@abusch abusch commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Subscribes to each group's playbackExtended namespace (sinuous-client 0.2.2) instead of both its playback and playbackMetadata ones. That saves a subscription per group (25 instead of 30 with 5 groups), and the playback status and metadata always describe the same moment.

  • One ExtendedPlaybackStatus event updates both; the metadata handling moved, unchanged, into Service::update_metadata.
  • Failed subscriptions are still reported with the group's name.

Tried read-only against a real household with debug logs: only PlaybackExtended subscriptions were made, without warnings; the current track, source, position and next track showed on start-up; and toggling shuffle on an idle speaker (then back) showed each change as the speaker reported it.

Unverified: whether speakers send playbackError events to playbackExtended subscribers. The namespace isn't in Sonos's public docs. They are still handled if they arrive; if they don't, playback errors stop showing in the title bar, and subscribing to playback again for them would undo the saving.

🤖 Generated with Claude Code

Subscribes to each group's playbackExtended namespace instead of both its
playback and playbackMetadata ones, which saves a subscription per group, and
keeps the playback status and metadata in step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant