/
/
/
# What does this implement/fix? Large messages sent over a remote connection are split into smaller pieces before they go out. Those pieces were cut to a fixed size, but the encoding applied afterwards makes each piece about a third bigger — so the finished piece could end up larger than the client said it can accept. Clients that don't state a size get assumed to accept only a small one, and anything over that is thrown away without a trace: not just album art, but any large update. Every client we ship today states a size that is comfortably large, so nobody is hitting this. The pieces are now cut to fit whatever the client actually accepts, and the sizing for today's clients is unchanged. Found while reviewing #5643, which fixed the same thing on the separate image channel. **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 - Chunk pieces are sized from the channel's negotiated message limit instead of a fixed 64 KiB, leaving room for the encoding growth and the wrapper around it. - Messages that fit are still sent whole, now also checked against that same limit. - Tests pin the frame layout released clients parse today, and cover a client that states no size of its own. - Documented the framing in the webserver README. ## 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.