/
/
/
# What does this implement/fix? Pressing volume up (or down) a few times in a row did not always move the volume as far as it should. The nudge steps from the volume the player last reported, but many players only report their new volume back a moment after the command: Chromecast, Sonos, DLNA, HEOS, Snapcast, Sendspin, Squeezelite, MusicCast, Samsung WAM, Yandex, WiiM and the Home Assistant players all do this. Two presses in that window both stepped from the same old level, so the second one landed on the value the first one had already set. The same applied to the group volume nudges. #5692 made those wait for each other, but waiting does not make the reported volume any fresher. Volume nudges now step from the level last commanded rather than the level last reported, for up to two seconds. After that the reported level takes over again, so turning the knob on the speaker itself still wins. - Volume up/down and group volume up/down all step from the level last commanded - The level is claimed before the command is handed on, so presses that overlap each still get their own step - The level is forgotten again two seconds later, so a change made on the device itself or from another app takes over - A group nudge sent to a player that is not in a group steps that player **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.