Repository navigation
Tell clients whether crossfade can be switched on for a queue - #506
Conversation
|
@Bot-MArley review |
Bot-MArley
left a comment
There was a problem hiding this comment.
Note
This comment was written by Claude and posted by Bot-MArley on behalf of the Music Assistant maintainers.
Thanks @marcelveldt! This adds a read-only crossfade_available flag to PlayerQueue so clients can show the crossfade toggle as unavailable instead of letting users hit an error. The field sits with the other runtime-derived flags, and its comment follows theirs. Defaulting to True keeps the current behaviour when an older server leaves the key out. The new tests only add cases and leave the existing ones alone.
No requested changes, this looks good. One small thing: the companion music-assistant/server PR isn't linked yet. Once it's linked and this is out of draft, it's ready for a maintainer to merge.
|
@Bot-MArley approve |
|
Note This comment was posted by Bot-MArley on behalf of the Music Assistant maintainers. @marcelveldt |
Update music-assistant-models to version [1.1.257](https://github.com/music-assistant/models/releases/tag/1.1.257) ## 🚀 Features and enhancements - Tell clients whether crossfade can be switched on for a queue (by @marcelveldt in [music-assistant#506](music-assistant/models#506)) ## 🧰 Maintenance and dependency bumps - Document the multiline format of a string config entry (by @marcelveldt in [music-assistant#505](music-assistant/models#505)) - Let config actions mark themselves as destructive (by @marcelveldt in [music-assistant#504](music-assistant/models#504)) ## 🙇 Contributors @marcelveldt Co-authored-by: musicassistant-bot[bot] <304008617+musicassistant-bot[bot]@users.noreply.github.com>
…assistant#8455) # What does this implement/fix? The server now tells clients whether crossfade can be switched on for a queue, so they can show the crossfade button as unavailable instead of showing an error after it is pressed. The button itself follows in the frontend. - New queue field `crossfade_available`, set by the same rule that refuses switching crossfade on (one shared check) - Refreshed on every update of the queue's player and whenever a player config is saved, so a changed playback method (also of a group's leader) is published right away - Derived at runtime and not stored with the cached queue **Related issue (if applicable):** - none ## 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` ## 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. - [x] For changes to shared models, the companion PR in `music-assistant/models` is linked. (music-assistant/models#506) - [ ] 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.
What does this implement/fix?
The queue now tells clients whether crossfade can be switched on with the playback method of its player, for example not on a speaker that plays track by track without gapless support. Clients need this to show the crossfade button as unavailable instead of letting the user press it and get an error; the server side follows in
music-assistant/serverand the button inmusic-assistant/frontend.PlayerQueue.crossfade_availablefield (defaults toTrue, so older servers and clients keep working)Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/serveris linked.