music-assistant-server

Branch:dev-lidarr-plugin

Commit Details

Use artist top tracks when sampling genre and dynamic radio seeds (#6155)

# What does this implement/fix?

Genre playback and Endless Mix artist/genre seeds resolved each sampled
artist through the `all_tracks` enqueue preference, walking the full
discography (throttled, uncached) only to keep 5 tracks per artist. They
now sample the bounded artist `top_tracks` listing, falling back to full
resolution when no provider offers one (local libraries, where it is
cheap); direct artist playback still honors the enqueue preference. This
affects nearly every streaming provider, since only phishin and qqmusic
declare `ARTIST_TRACKS`; the old walk cost roughly 25-100s per 50-album
artist depending on the provider's throttle (Tidal ~1 min, hence the
report), repaid on every dynamic refill.

**Related issue (if applicable):**

- related issue https://github.com/orgs/music-assistant/discussions/6276

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

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Forgejo

Author

Jozef Kruszynski<[email protected]>
September 3, 2026 at 07:56 AM UTC

Committer

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

Parent commits

Changes

4 files
+36-0

Changed Files (4)

music_assistant/controllers/player_queues/
music_assistant/providers/radio_playlist/
tests/controllers/player_queues/
tests/providers/radio_playlist/
music_assistant/controllers/player_queues/media_resolver.py
music_assistant/providers/radio_playlist/__init__.py
+1
tests/controllers/player_queues/test_tracks_for_playback.py
tests/providers/radio_playlist/test_radio_playlist.py
+35