/
/
/
# What does this implement/fix? Playing an announcement on an idle Cast player left the Music Assistant receiver app loaded on the device for good. On a TV or Nest Hub that means Music Assistant stays on screen instead of the backdrop, and the device keeps looking busy to other apps. The same thing happened after ordinary playback: the device is only released when a stop command is sent, and nothing sends one when the queue simply runs out or an announcement finishes. The device is now released once the player settles into idle, using the same short delay a stop already uses — so anything that follows shortly after (an announcement, the next queue, a dashboard) still reuses the Cast session. - Cast devices are released when playback ends on its own, not just on an explicit stop - Devices that keep reporting "buffering" at the end of a stream instead of going idle are now released too - Cast groups are left alone: closing their app is what their power control does - A paused player keeps its session, so resuming it does not restart the device **Related issue (if applicable):** - n/a ## Types of changes - [x] 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` - [ ] 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.