/
/
/
# What does this implement/fix? Moving the group volume slider sends a stream of volume commands while you drag. Those commands were not serialized, so with a slow speaker a command from earlier in the drag could land after the last one, leaving the group a few points away from where you let go. Group volume now uses a lock of its own, so the commands are handled in the order they were sent. - Serialize `group_volume`, `group_volume_up` and `group_volume_down` per group - Give group volume a separate lock purpose: the fan-out sets the volume of all members at once and a sync leader is a member of its own group, so reusing the single player volume lock would make the group command wait on itself - Resolve the sync leader before locking, so adjusting the group from a member and from its leader guards the same group - The fan-out now takes the volume lock of each member too, so a group volume change and an individual volume command for that member can no longer overtake each other - Added tests for the ordering, for a muted sync leader, and for both of the above **Related issue (if applicable):** - n/a ## 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` - [x] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## 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.