music-assistant-server
Branch:dev-lidarr-plugin
Commit Details
Attach the parent album to imported album tracks (#6111)
# What does this implement/fix? <!-- Quick description and explanation of changes. --> Some providers nest their tracks inside the album object and leave the (redundant) album off each track. Qobuz and YTMusic both do this, so tracks added by the album track import landed in the library with no album at all, showing up unfiled with disc and track number 0. Both call sites already hold the album and now pass it down, so no extra provider request is made. A caller that does not hold it falls back to get_album once per import rather than once per track. Existing unfiled tracks are repaired on the next import, the same backfill the library track sync already does. **Related issue (if applicable):** - related issue https://github.com/music-assistant/support/issues/6254 ## 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.
Author
OzGav<[email protected]>
August 31, 2026 at 12:22 PM UTC
Committer
Marvin Schenkel<[email protected]>
September 4, 2026 at 07:55 AM UTC
23additions
12deletions
4files changed
Parent commits
Changes
4 files
+23-12
Changed Files (4)
music_assistant/controllers/music/
music_assistant/models/
tests/controllers/music/
tests/
music_assistant/controllers/music/controller.py
music_assistant/models/music_provider.py
+21-10
tests/controllers/music/test_album_track_import.py
tests/test_library_sync.py
+2-2