/
/
/
# What does this implement/fix? When a player is muted while it is part of a group, we remember that with a "mute lock" so a group volume change does not bring it back to life. That lock was never cleared once the player left the group, so an ungrouped speaker could keep behaving as if it were still a muted group member: it was no longer auto-unmuted by a volume change, and a speaker using fake mute even had its volume forced back to 0 on every volume command. The lock is now only honoured for as long as the player is actually grouped — the same condition under which it is set. That also covers groups that fall apart outside Music Assistant (Home Assistant and WiiM report their group members straight from the device), which no cleanup on our own ungroup commands would have caught. **Related issue (if applicable):** - n/a ## Types of changes <!-- Tick exactly one box. CI (.github/workflows/pr-labels.yaml) derives the label from the ticked box and applies it automatically; the release-notes generator uses that same label to slot this change into the next release notes. --> - [ ] 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` - [x] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` One side effect worth calling out: an announcement aimed at a single muted speaker that was in a group releases that speaker from the group first, so it is now turned up for the announcement instead of announcing into a muted speaker. That matches what already happens for a muted speaker that was not in a group. ## Changes - A mute lock is only applied while the player is still synced, in a group, or leading one. - Moved the group check and the mute lock lookup into small shared helpers. - Added regression tests for a muted player whose group disappears, for both native and fake mute, and for a player that plays through a separate streaming protocol. ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `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. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.