music-assistant-server

Branch:dev-lidarr-plugin

Commit Details

Cheaper track changes: Spotify Soloist advertises its real single-stream limit (#6172)

# What does this implement/fix?

Follow-up to #6141 and #6170. The soloist engine plays one single-track
run at a time, but the provider still advertised librespot's two-slot
stream budget. The next-track prefetch (~60s before a track ends)
therefore passed the upfront slot check and spun up a full pipeline —
audio buffer, ffmpeg, engine request — twice per track change, only for
the engine to refuse it. #6170 silenced the warnings this produced; this
removes the wasted work itself.

- the stream-slot budget now follows the configured backend: one slot
for soloist (which is what the provider README already documented), and
three for librespot to cover two playing queues plus a prebuffer
- no new machinery: with a truthful slot count, the early prefetch now
costs a short quiet wait on the slot instead of a pipeline spawn, and
the retry fired once the current track has fully arrived takes the freed
slot, as before
- replaces the soloist module docstring that still described the
continuous-session design #6141 removed

**Related issue (if applicable):**

- related issue N/A

## 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.
Forgejo

Author

Marcel van der Veldt<[email protected]>
September 2, 2026 at 09:48 PM UTC

Committer

Marvin Schenkel<[email protected]>
September 4, 2026 at 07:55 AM UTC
22additions
19deletions
5files changed

Parent commits

Changes

5 files
+22-19

Changed Files (5)

music_assistant/providers/spotify/
music_assistant/providers/spotify/backends/
tests/providers/spotify/
tests/providers/stream_limits/
music_assistant/providers/spotify/README.md
music_assistant/providers/spotify/backends/soloist.py
+4-10
music_assistant/providers/spotify/provider.py
tests/providers/spotify/test_backends.py
+16-7
tests/providers/stream_limits/test_stream_limits.py
+2-2