/
/
# What does this implement/fix? Some players (Sendspin web players in particular) can switch between being a speaker output that belongs to another player and being a player of their own. When that switch happened, the player was only swapped in place: it never got a queue and clients were never told it appeared or disappeared. The result was a player that showed up but could not play anything until Music Assistant was restarted, or a leftover queue for a player that is now hidden behind its parent. - A player that becomes a normal player now gets its queue and is announced as added. - A player that becomes a speaker output of another player has its queue removed and is announced as removed. - The speaker links from the role the player just left are released, so it no longer stays attached to (or keeps owning) outputs it should not. - Its regular state update is untouched, so queues, bridges and grouping keep seeing the change. **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.