Fix sync group toggle (#3142)
authorOzGav <gavnosp@hotmail.com>
Thu, 12 Feb 2026 07:24:36 +0000 (17:24 +1000)
committerGitHub <noreply@github.com>
Thu, 12 Feb 2026 07:24:36 +0000 (08:24 +0100)
commit337cb5443a603181c301927d523e5e515dc756f0
tree0b0901010a22b3869d69b9565ea19d127062b2b8
parent5a7ae1261c6d1e9c5f9b00803af1d3f28493e17d
Fix sync group toggle (#3142)

* Fix dynamic sync group toggle having no effect on member checkboxes

PR #3118 made _attr_static_group_members unconditionally populated for
both dynamic and static groups. Since the frontend uses
static_group_members to determine which players are non-removable
(greyed out, no checkbox), this caused all members to appear locked
regardless of the dynamic toggle setting.

Restore the conditional assignment: dynamic groups get an empty
static_group_members list (all members removable), static groups get
the configured members list (all members locked). Fix the power-off
reset to read configured members directly from config instead of
_attr_static_group_members, so dynamic groups preserve their member
list on power-off without needing them marked as static.

https://claude.ai/code/session_01VVeBMzkvqTrutpg53aMtBY

* Remove added comments

https://claude.ai/code/session_01VVeBMzkvqTrutpg53aMtBY

---------

Co-authored-by: Claude <noreply@anthropic.com>
music_assistant/controllers/players/sync_groups.py