/
/
# What does this implement/fix? Follow-up to #5770/#5771/#5776: duplicate albums and tracks still appeared because several matching rules were stricter than the metadata providers actually deliver. Replayed against a real multi-provider library (Apple Music + Qobuz + local files), these fixes take matched duplicate track pairs from 8 to ~1,760 of 2,187 and nearly double the matched album pairs. - Fix the title/version parser appending stale text from already-consumed bracket groups (corrupted versions like `Deluxe Deluxe)`) - Deduplicate version tokens and honour ignore-phrases (e.g. `Hi-Res`) inside larger version strings again - Treat a missing disc number as disc 1 so local files without a disc tag can match their streaming counterparts - Let a shared barcode also resolve an ambiguous edition wording, not just a release-year difference - Normalize album titles the same way as the search index and ignore trailing ` - EP` / ` - Single` suffixes when comparing - Recover Qobuz barcodes that are delivered with a truncated check digit - Backfill missing barcodes when enriching sparse albums and process 25 albums per metadata scan run (was 5) so duplicate repair drains faster - Stop the external-id candidate scan at the first verified match (faster syncs) - Small cleanups: drop the legacy `0` UPC prefix in the Spotify parser, use the shared ISRC/MBID normalization in the MusicBrainz and M3U import paths **Related issue (if applicable):** - N/A ## Types of changes - [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.