/
/
# What does this implement/fix? We tried different fixes based on available data to check whether we want to update the metadata on a playing HEOS device. The problem is that HEOS can send media update events out of order and potentially a little bit delayed, causing the metadata inside MA to get overriden. This mostly happens when HEOS is playing from an external source before starting playback from MA. Because the combination with out of order events, and HEOS not providing us with any data from the media update (besides 'URL Stream') is not reliable to check whether we should accept the update, this fix adds a transition period during which those updates are ignored. The transition period is currently set to 5 seconds, in my testing my devices always seem to report back the correct state after +-1.5 seconds, but environments with all wireless devices might have slower responses. In my opinion, 5 seconds is fine, this just means users cannot start playback from another source on the HEOS device. Well, they can but MA will just ignore those updates until a new update comes in after the 5 second period. <!-- Quick description and explanation of changes. --> **Related issue (if applicable):** - related issue https://github.com/music-assistant/support/issues/5614 ## Types of changes <!-- Tick exactly one box. CI (.github/workflows/pr-labels.yaml) derives the label from the ticked box and applies it automatically; the release-notes generator uses that same label to slot this change into the next release notes. --> - [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. --------- Co-authored-by: Marcel van der Veldt <[email protected]>