Skip to content

fix(musicbrainz): search a compilation's release as Various Artists - #64

Merged
suitux merged 1 commit into
suitux:mainfrom
Hellraiser28:fix/various-artists-album-lookup
Oct 27, 2026
Merged

suitux merged 1 commit into
suitux:mainfrom
Hellraiser28:fix/various-artists-album-lookup

Conversation

@Hellraiser28

Copy link
Copy Markdown
Contributor

Follow-up to #42, reported by @nielsha in #42 (comment).

The bulk MusicBrainz lookup prefilled the search with the most common album artist, or the track artist when that was empty. On a compilation without an album artist tag every track artist appears once, so the first track's artist won and the release search found nothing.

Now the artist is chosen like this:

  • If the files carry an album artist, that is used.
  • Otherwise the track artists are compared by their main artist, ignoring guests after feat., ft., &, x, with, vs. or a comma. If no artist appears on more than half of the songs, the search starts with Various Artists, MusicBrainz' own name for compilations.
  • A regular album with guest appearances keeps its artist, e.g. "Kendrick Lamar" for tracks credited "Kendrick Lamar feat. SZA".

Tested

  • helpers.test.ts with 7 new tests. All MusicBrainz tests pass (38), ESLint, Prettier and tsc are clean.
  • Against the MusicBrainz API with the query the modal builds: release:"Bravo Hits 1" AND artist:"Various Artists" finds 2 releases, with the first track's artist (Madonna) 0. Same for "Now That's What I Call Music! 50": 7 releases versus 0 with Robbie Williams.

@suitux
suitux merged commit 5397ba7 into suitux:main Oct 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants