/
/
# What does this implement/fix? Some providers spell out the format in an album title — Apple Music stores an EP as "Stargazing - EP" rather than "Stargazing". The duplicate track lookup paired the two tracks' albums on the stored normalized title, which keeps that suffix, so the same track held on both a suffixed and a plain copy of the album was never recognised as a duplicate. #5809 closed this gap for the album reconciliation guard; this does the same for tracks, reusing the suffix keys that PR introduced. The looser lookup on its own would be weaker evidence than an exact title match, so the pair is now also held to `compare_album_name()` before it can merge. **Related issue (if applicable):** - follow-up to #5809, on the queries added in #5792 ## Types of changes - [ ] 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` - [x] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Changes - Both duplicate-track queries relate album titles through a shared `_album_title_match()` helper that sees past a spelled-out `- EP` / `- Single`, mirroring the guard in the metadata controller. - The album agreement check now confirms the title with `compare_album_name()` as well as the edition, so the looser lookup cannot vouch for an identity the comparison rejects — including an EP against the single of the same name. - Album titles that normalize to nothing are excluded from both sides, not just one. - Regression tests for both suffixes from either side, plus the cases that must stay apart. ## 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.