/
/
# What does this implement/fix? Google Cast devices show no next/previous track buttons while Music Assistant is playing (Google Home app, Nest Hub touch controls, Android TV remotes). The receiver never advertises the `QUEUE_NEXT`/`QUEUE_PREV` media commands, so the Cast UI never draws the buttons. This is the server half of the fix. The companion receiver PR (music-assistant/cast-receiver#4) makes the receiver app advertise those commands and forward button presses as a `player_command` message on the existing `urn:x-cast:io.music-assistant.cast` namespace. This PR receives that message and drives the MA queue, keeping MA the single source of truth (works in flow mode too, where there is no real Cast queue). - Add `MassCastCommandController` on the MA cast namespace, parsing forwarded `next`/`previous` commands - Register it on every Cast player, unregister on unload - Dispatch to `player_queues.next/previous` via the event loop, resolving the queue owner (cast group / universal player wrap) like `_flow_stream_underrun` - Ignore commands when the resolved queue is not active (e.g. dashboard-only sessions) Inert until the receiver app ships: the production receiver never sends `player_command`. **Merge order matters**: this must be in a published release before the receiver PR deploys, otherwise devices show buttons that do nothing and Assistant voice skip breaks on older servers. Verified on hardware (Nest Hub): buttons and voice, next and previous, flow and non-flow mode. **Related issue (if applicable):** - related issue https://github.com/music-assistant/support/issues/2969 ## Types of changes - [ ] 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. - [ ] 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.