/
/
/
# What does this implement/fix? Replaces the Sendspin "Allow unencrypted connections" option with a single "Allow legacy clients" compatibility switch, and uses it to gate correct `stream/clear` behavior for track changes. ## `stream/clear` for skips and seeks The Sendspin spec has a `stream/clear` message meant for skips and seeks, but Music Assistant never used it: it sent `stream/end` immediately followed by `stream/start` instead. Both are valid per the spec, but `stream/clear` lets clients handle seeks and skips more efficiently, and it keeps `stream/end` for what it is meant to signal, an empty queue. Since some clients might still mishandle `stream/clear`, the new path only runs when legacy clients are disallowed. ## The new "Allow legacy clients" option Unencrypted transport is itself a deviation from the spec, so the former encryption toggle is folded into one compatibility switch that covers every tolerated deviation and is also passed to aiosendspin's own compliance handling. It defaults to enabled, and the goal is to flip that default and eventually drop the option once clients have caught up. Turning it off means: no unencrypted clients (which currently includes the built-in web player), clients that deviate from the spec are rejected instead of tolerated, and the server uses `stream/clear` for track changes. Tested with the latest version of `sendspin-js`. `stream/clear` is used instead of stopping the stream, everything else also keeps working since it implements the latest version. **Related issue (if applicable):** - ## Types of changes - [ ] 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.