/
/
/
# What does this implement/fix? WiiM playback state was effectively event-driven only. The provider's poll fetched the playback position and nothing else, so once a speaker stopped pushing UPnP events its state could stay frozen — a track that had ended still showing as playing or paused, with nothing able to correct it. The WiiM SDK already exposes a method that reads the speaker's real transport state over HTTP, it just was never called after startup. The poll now uses it, so what Music Assistant shows follows the speaker again even when events go missing. **Related issue (if applicable):** - n/a ## Types of changes - [ ] 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` ## Changes - The WiiM poll now refreshes the speaker's play state, source and volume, instead of only its position. - Speakers that answer a command with an error instead of a plain refusal no longer let that error escape the command — this affected volume and source changes. - A speaker the SDK has already marked unreachable is no longer queried by the poll. - Added tests for the above. Two notes on what this does not change. The 60s grace period for an abandoned streaming app (#5701) stays: the speaker reports a released session as a plain pause, so there is still no reliable signal to replace the timer with. And a source that started playing while updates were missing is still not picked up — this fixes stop and pause detection, not "started playing externally". ## 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.