fix(scanner): exclude Vorbis VERSION from albumversion tag mapping (#5194)

The Vorbis/FLAC VERSION field is for track-level disambiguation (e.g.
remix, live, 30s edit), not album versioning. Including it in the
albumversion aliases caused albums to split incorrectly when tracks
had different VERSION values and no MusicBrainz Album ID was set.

Remove 'version' from the albumversion aliases in mappings.yaml.
Users who want the old behavior can re-add it via Tags config.

Update the PID test to use 'albumversion' directly instead of
'version' as the raw PID attribute, with a realistic value.

Fixes #5082

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
This commit is contained in:
Tom Boucher
2026-03-23 18:32:05 -04:00
committed by GitHub
parent 8a19fa9991
commit 356b0716b6
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -65,7 +65,7 @@ var _ = Describe("getPID", func() {
Context("calculated attributes", func() {
BeforeEach(func() {
DeferCleanup(configtest.SetupConfig())
conf.Server.PID.Album = "musicbrainz_albumid|albumartistid,album,version,releasedate"
conf.Server.PID.Album = "musicbrainz_albumid|albumartistid,album,albumversion,releasedate"
})
When("field is title", func() {
It("should return the pid", func() {
@@ -88,13 +88,13 @@ var _ = Describe("getPID", func() {
It("should return the pid", func() {
spec := "albumid|title"
md.tags = map[model.TagName][]string{
"title": {"title"},
"album": {"album name"},
"version": {"version"},
"releasedate": {"2021-01-01"},
"title": {"title"},
"album": {"album name"},
"albumversion": {"deluxe edition"},
"releasedate": {"2021-01-01"},
}
mf.AlbumArtist = "Album Artist"
Expect(getPID(mf, md, spec, false)).To(Equal("(((album artist)\\album name\\version\\2021-01-01))"))
Expect(getPID(mf, md, spec, false)).To(Equal("(((album artist)\\album name\\deluxe edition\\2021-01-01))"))
})
})
When("field is albumartistid", func() {
+1 -1
View File
@@ -81,7 +81,7 @@ main:
albumsort:
aliases: [ tsoa, albumsort, soal, wm/albumsortorder ]
albumversion:
aliases: [albumversion, musicbrainz_albumcomment, musicbrainz album comment, version]
aliases: [albumversion, musicbrainz_albumcomment, musicbrainz album comment]
album: true
genre:
aliases: [ tcon, genre, ©gen, wm/genre, ignr ]