/
/
# What does this implement/fix? Follow-up to #5783. Artists that exist on several providers often stayed unlinked. The artist matcher compared names with plain lowercase equality, while the database lookup that surfaces the candidates in the first place already ignores accents, punctuation and spacing — so "Björk" and "Bjork", or "Céline Dion" and "Celine Dion", were offered up as a candidate and then rejected again. The matcher also rolled its own name comparisons instead of using the shared compare helpers the other media types moved to, and never checked the artist it fetched from the provider before linking it. Replayed against a real 8,000-artist library: 234 groups of artist rows turn out to be the same artist under two spellings, and 90 more artist pairs now match (no wrong merges found in any of them). Matched duplicate track pairs go from 1,851 to 1,866 on the same library. - Compare names the same way we look them up, so accent, punctuation and spacing differences no longer block a match - Names made purely of symbols (the band "!!!") are still compared as-is, so they can't all collapse into each other - Match artists with the shared track/album/artist compare helpers instead of hand-written name checks - Verify the full artist fetched from the provider before linking it - A different edition of a reference album no longer blocks the artist match: only the album's identity counts, and the credits on it decide the artist Comparing names this way costs more than a plain lowercase check (about 1.4µs extra per comparison that isn't an exact match), so CodSpeed flags the `compare_strings` benchmark. That is a deliberate trade: it is the comparison that was missing the matches, and even a full library resync only spends about a second more on it. **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.