From a4116e01c26a88673e420e89944ca3b5eaacba4d Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 24 May 2026 23:35:11 -0300 Subject: [PATCH] docs(scanner): correct unsubstantiated comment about UnknownArtist taggers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous comment claimed 'some rippers emit the literal [Unknown Artist] string' — no such tagger is actually known. The defensive second clause in the missing-albumartist check was preserving accidental behavior from the prior parseArtists implementation, not guarding against a documented real-world case. Rewrite the comment to be honest about provenance: keep the clause for behavioral parity and the cheap round-trip defense, but stop asserting facts I can't back up. --- model/metadata/map_participants.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/model/metadata/map_participants.go b/model/metadata/map_participants.go index e8cf0b197..79c0e7b91 100644 --- a/model/metadata/map_participants.go +++ b/model/metadata/map_participants.go @@ -57,10 +57,13 @@ func (md Metadata) mapParticipants() model.Participants { albumCredits := md.getArtistValues(model.TagAlbumArtistCredit, model.TagAlbumArtistsCredit) // Treat both "no albumartist tag" and "albumartist tag literally set to - // the UnknownArtist placeholder" as missing — some rippers emit the - // literal '[Unknown Artist]' string, and the original parseArtists path - // (replaced in this branch) substituted UnknownArtist on its own so the - // downstream check matched either case. + // the UnknownArtist placeholder" as missing. Preserves behavioral parity + // with the prior parseArtists path (replaced in this branch), which + // substituted UnknownArtist on its own and then matched either case + // downstream. No concrete tagger known to emit the literal '[Unknown + // Artist]' string, but the cost of keeping the second clause is one + // comparison and it defends against the placeholder round-tripping if + // Navidrome's own UnknownArtist value ever ends up back in a tag. albumArtistMissing := len(albumNames) == 0 || (len(albumNames) == 1 && albumNames[0] == consts.UnknownArtist)