Skip to content

Commit

Permalink
fix(seed): Only omit artist name if we know its MBID
Browse files Browse the repository at this point in the history
The conclusion in 118f0d7 was wrong.
If we have an artist without MBID whose name and credited name are
identical, the artist credit editor on MB had an empty search field.
  • Loading branch information
kellnerd committed Oct 15, 2024
1 parent 37ca064 commit d096fa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion musicbrainz/seeding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function convertArtistCredit(artists?: ArtistCreditName[]): ArtistCreditS
const defaultJoinPhrase = (index !== lastIndex) ? (index === lastIndex - 1 ? ' & ' : ', ') : undefined;

return {
artist: artist.name !== artist.creditedName ? { name: artist.name } : undefined,
artist: !artist.mbid ? { name: artist.name } : undefined,
mbid: artist.mbid,
name: artist.creditedName,
join_phrase: artist.joinPhrase ?? defaultJoinPhrase,
Expand Down

0 comments on commit d096fa2

Please sign in to comment.