music-assistant-server

Branch:dev-lidarr-plugin

Commit Details

Align smart playlists similar music with Endless Mixes (#6121)

# What does this implement/fix?

Smart playlists with seeds (the "similar music" mode) played almost
exclusively similar tracks: only ~1 in 25 tracks came from the seed
collection itself, because each seed track pulled in up to 25 similar
tracks that crowded it out of the pool. The endless mix feature already
solves this well, guaranteeing a handful of seed tracks in every batch.

Seeded smart playlists now build their pool with the endless mix
generator from the builtin radio playlist provider (the same coupling
the queue and Music Quiz already use), so they include the same share of
seed tracks as an endless mix (roughly 13% instead of 4%).

- Seed mode fetches each seed's pool via
`RadioPlaylistProvider.get_dynamic_tracks`, concurrently per seed,
keeping the even per-seed round-robin and post-filters.
- Large static targets accumulate multiple batches so one-shot generated
playlists still fill up to their configured limit.
- Seed-mode tests reworked, plus composition tests that run the real
generator end to end.

**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.
-->

- [ ] 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.
Forgejo

Author

Marvin Schenkel<[email protected]>
August 31, 2026 at 12:34 PM UTC

Committer

Marvin Schenkel<[email protected]>
September 4, 2026 at 07:55 AM UTC
189additions
37deletions
2files changed

Parent commits

Changes

2 files
+189-37

Changed Files (2)

music_assistant/providers/smart_playlist/
tests/providers/smart_playlist/
music_assistant/providers/smart_playlist/__init__.py
+9-3
tests/providers/smart_playlist/test_smart_playlist.py
+180-34