From 356b0716b69b5648df53613c7f3d905741f34af8 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Mon, 23 Mar 2026 18:32:05 -0400 Subject: [PATCH] fix(scanner): exclude Vorbis VERSION from albumversion tag mapping (#5194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- model/metadata/persistent_ids_test.go | 12 ++++++------ resources/mappings.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/model/metadata/persistent_ids_test.go b/model/metadata/persistent_ids_test.go index ad81eaa53..9f1dacbd4 100644 --- a/model/metadata/persistent_ids_test.go +++ b/model/metadata/persistent_ids_test.go @@ -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() { diff --git a/resources/mappings.yaml b/resources/mappings.yaml index d1da5c620..19ba0b090 100644 --- a/resources/mappings.yaml +++ b/resources/mappings.yaml @@ -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 ]