/
/
/
# What does this implement/fix? <!-- Quick description and explanation of changes. --> I did the following things: - Reworked the client to parse the xmls into mashumaro-based dataclasses. - Verified, that the present tests also work with the reworked client. - Wrote the client in a way, which could potentially move it into its own future lib. - Using an asyncio.lock where applicable, that improved stability quite a bit. - Switch the default audio format to mp3 - at least for me that was way more stable, though of course the other options still exist - Removed the dependency on the dlna provider - of course, it's still a upnp player, but the few commands we need, we can just generate from present dlna helpers. - Added the ability to store a (fake) preset on the player, and detect present ones. If the player has no preset stored at all, the button will not emit the event, thus not work. - Added two player options, bass (writable) and network name (only read currently). Future PRs may enhance this. - Tried to reduce redundancy/ code where possible. - Forward preset selection to the group leader, if there is a group leader If we want to stick with the previous approach of parsing the xmls, that is fine, and I can undo that. It was still a chance for me to get to know this API. Future follow-up: - Presets are still configured per provider - it should be easy to have the provider ones as a global fallback, and optional individual ones per player - Add some more player options should that be possible. - The ws client should become part of the client too. It hasn't been touched. **Related issue (if applicable):** - related issue <link to issue> ## 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. --> - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [x] 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: OzGav <[email protected]>