fix(scanner): lyrics tag parsing to properly handle both ID3 and aliased tags

* fix(taglib): parse both id3 and aliased tags, as lyrics appears to be mapped to lyrics-xxx

* address feedback, make confusing test more stable
This commit is contained in:
Kendall Garner
2025-07-09 03:27:40 +00:00
committed by GitHub
parent 65961cce4b
commit 6730716d26
4 changed files with 100 additions and 33 deletions
+6 -2
View File
@@ -245,10 +245,14 @@ func processPairMapping(name model.TagName, mapping model.TagConf, lowered model
}
}
// always parse id3 pairs. For lyrics, Taglib appears to always provide lyrics:xxx
// Prefer that over format-specific tags
id3Base := parseID3Pairs(name, lowered)
if len(aliasValues) > 0 {
return parseVorbisPairs(aliasValues)
id3Base = append(id3Base, parseVorbisPairs(aliasValues)...)
}
return parseID3Pairs(name, lowered)
return id3Base
}
func parseID3Pairs(name model.TagName, lowered model.Tags) []string {