/
/
/
# What does this implement/fix? Follow-up to #5461 for the DLNA provider, which mixed up "zero" and "unknown" in both directions. **Playback position.** A position of exactly `0` was read as "no position reported", so the previous, now stale, position was kept instead. The inline comment framed the check as "did the device actually report anything?", but `async_upnp_client` already answers that with `None` — it returns `None` when `RelativeTimePosition` is unset, when the device sends `NOT_IMPLEMENTED`, and when the reported time cannot be parsed. A `0` only ever comes from a device that genuinely reported `00:00:00`. Since #5461 a DLNA player's position also feeds the position anchor of any universal group it plays in, so a stale position there propagates to the group. **Volume and mute.** The other way around: an *unknown* volume or mute state was reported as `0` / unmuted. Both are documented as nullable on the player model, and a protocol player reporting volume `0` for "unknown" is the exact confusion that #5139 had to work around twice for AirPlay — so this removes the cause rather than adding a third workaround. **Related issue (if applicable):** - follow-up to #5461 ## Changes - Adopt a reported position of `0` instead of keeping the previous one. - Keep an unknown volume or mute state unknown instead of reporting `0` / unmuted. - Replaced the misleading comment with what the library actually guarantees. - Tests for the position and volume/mute contracts, which had no coverage before. ## 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` ## 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.