Skip to content

Sync groups: keep slaved followers in group member dropdown after removal#4036

Open
MarvinSchenkel wants to merge 2 commits into
devfrom
claude/charming-heisenberg-diTjk
Open

Sync groups: keep slaved followers in group member dropdown after removal#4036
MarvinSchenkel wants to merge 2 commits into
devfrom
claude/charming-heisenberg-diTjk

Conversation

@MarvinSchenkel
Copy link
Copy Markdown
Contributor

What does this implement/fix?

When a member is removed from a sync group config during active playback, it remains slaved at the protocol level (synced_to is non-None). Because a synced follower's can_group_with returns an empty set (players already synced cannot group with others), and the player is no longer in saved_ids (it was just removed from config), it disappeared entirely from the "Group members" dropdown — making it impossible to re-add without stopping playback first.

The fix adds or x.state.synced_to to the get_config_entries() member-picker condition. A player with SET_MEMBERS support that is currently a synced follower is still group-capable; it is just temporarily occupied. This matches the intent of the existing saved_ids fallback (which was added to prevent the same class of disappearing-player bug during active playback).

Related issue (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • New feature (non-breaking change which adds functionality) — new-feature
  • Enhancement to an existing feature — enhancement
  • New music/player/metadata/plugin provider — new-provider
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) — breaking-change
  • Refactor (no behaviour change) — refactor
  • Documentation only — documentation
  • Maintenance / chore — maintenance
  • CI / workflow change — ci
  • Dependencies bump — dependencies

Checklist

  • The code change is tested and works locally.
  • pre-commit run --all-files passes.
  • pytest passes, and tests have been added/updated under tests/ where applicable.
  • For changes to shared models, the companion PR in music-assistant/models is linked.
  • For changes affecting the UI, the companion PR in music-assistant/frontend is linked.
  • I have read and complied with the project's AI Policy for any AI-assisted contributions.

Generated by Claude Code

… removal

When a member is removed from a sync group config during active playback
it remains slaved at the protocol level (synced_to is non-None) but its
can_group_with returns empty (players already synced cannot group with others).
Since the player is no longer in saved_ids and can_group_with is empty, it
disappeared from the group member dropdown making it impossible to re-add
without stopping playback first.

Fix by also including players whose synced_to is set: a synced follower
is still group-capable, it is just temporarily occupied.

Fixes: music-assistant/support#5559
… removal

When a member is removed from a sync group config during active playback
it remains slaved at the protocol level (synced_to is non-None) but its
can_group_with returns empty (players already synced cannot group with others).
Since the player is no longer in saved_ids and can_group_with is empty, it
disappeared from the group member dropdown making it impossible to re-add
without stopping playback first.

Fix by also including players whose synced_to is set: a synced follower
is still group-capable, it is just temporarily occupied.

Fixes: music-assistant/support#5559
Copilot AI review requested due to automatic review settings May 31, 2026 05:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a UI regression where a sync-group member removed mid-playback disappeared from the "Group members" dropdown because its can_group_with was empty while still slaved at the protocol level.

Changes:

  • Extends the member-picker condition in SyncGroupPlayer.get_config_entries() to also include players that are currently synced followers (x.state.synced_to).

@MarvinSchenkel MarvinSchenkel changed the title fix(sync_group): keep slaved followers in group member dropdown after removal Sync gorups: keep slaved followers in group member dropdown after removal May 31, 2026
@MarvinSchenkel MarvinSchenkel changed the title Sync gorups: keep slaved followers in group member dropdown after removal Sync groups: keep slaved followers in group member dropdown after removal May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants