Keep same-provider artists with different ids apart - #6324
jozefKruszynski wants to merge 4 commits into
Conversation
Two artists that one streaming provider instance knows under different ids were merged into a single library artist on a case-insensitive name match. The artists controller now rejects such a candidate unless a strong external id says they are the same, and applies the same rule to search-result deduplication. Providers whose ids are not stable, like the filesystem providers, are exempt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
✅ The title and description are good to go. Thanks! |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
🟡 Changes recommended
Similar-artist deduplication incorrectly ignores the documented external-ID override.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Prevents same-name artists with conflicting IDs from being merged.
Changes:
- Adds provider-ID conflict detection.
- Reuses strong artist external-ID types.
- Adds focused matching tests.
File summaries
| File | Description |
|---|---|
artists.py |
Adds conflict-aware matching and deduplication. |
compare.py |
Exposes artist external-ID types. |
test_artist_provider_id_conflict.py |
Tests provider-ID matching behavior. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
🚧 Automated critical-issue gate — this PR has an unresolved Maintainers: add the |
The dedup kept two same-instance candidates apart even when they shared a MusicBrainz, Discogs or TADB id, unlike the library confirm path. Both paths now go through one helper that lets a strong external id win. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the described behavior and covers the relevant edge cases without introducing contract changes.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Balanced
|
Status: on hold, kept as draft. Testing against a real library showed that a streaming provider can legitimately list one artist under two ids with an identical name. Tidal does this for GUNSHIP, Seeb, Keeno and PRIZM in my own library. The rule in this PR, same instance plus different ids means distinct artists, would split those into duplicate library artists. The reported loud/LOUD case is real, but names and provider ids alone cannot tell the two situations apart, and Tidal supplies no external ids for artists that could. The automated repair in #6327 is closed for the same reason. The likely direction is manual reassignment of a provider artist id and MBID on a library artist, backed by storing the provider id on each track and album credit so the right items follow. That needs its own design before this PR can move. |
What does this implement/fix?
Two artists that one streaming provider instance knows under different ids were merged into a single library artist whenever their names matched case-insensitively (for example the Tidal artists "loud" and "LOUD"). The artists controller now treats such a candidate as a distinct artist unless a MusicBrainz, Discogs or TADB id says otherwise, and applies the same rule when deduplicating artist search results. Providers whose ids are not stable, such as the filesystem providers, are exempt. Artists already merged in existing libraries are not split by this change; the follow-up PR #6327 adds a repair pass for those.
Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.