/
/
/
The four volume nudge commands (`cmd_volume_up`/`_down` and their group
equivalents) each hardcoded the same adaptive ladder: step 1 below 10 or
above 90, step 2 below 30 or above 70, step 3 in the middle. That ladder
now lives behind a single `_get_volume_step` helper, and a new
`volume_step` integer entry on the `players` core config overrides it
with a flat step.
`0` is the default and means "keep the adaptive ladder", so behaviour on
existing installs is unchanged. The value is read per command rather
than cached, so a change takes effect without a reload.
At the request of maintainers, putting the setting on the server rather
than in a front-end UI makes it apply consistently everywhere: the
scroll wheel and tap-at-the-edges already call
`players/cmd/volume_up`/`volume_down`, so they have always followed the
server ladder, and a frontend-only setting could never reach them.
# What does this implement/fix?
This PR supports the front-end PR
(https://github.com/music-assistant/frontend/pull/2274), which adds
volume control options ("absolute" and "relative") and presents the
volume-steps server configuration changes made here.
## 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`
- [X] 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
- [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.
- [x] 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 for any
AI-assisted contributions.
- [ ] I have raised a PR against the documentation repository targeting
the main or beta branch as appropriate.
---------
Co-authored-by: Quadcom <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Co-authored-by: Marcel van der Veldt <[email protected]>