Added barcode tag parsing in releases, and take it into account to avoid merging unrelated albums, fixes #550

This commit is contained in:
emeric
2024-11-14 13:22:05 +01:00
parent 0164038794
commit 5504ee707c
7 changed files with 26 additions and 2 deletions
+2
View File
@@ -41,6 +41,7 @@ namespace lms::metadata
{ TagType::AlbumArtist, { "MyAlbumArtist1 & MyAlbumArtist2" } },
{ TagType::AlbumArtists, { "MyAlbumArtist1", "MyAlbumArtist2" } },
{ TagType::AlbumArtistsSortOrder, { "MyAlbumArtist1SortName", "MyAlbumArtist2SortName" } },
{ TagType::Barcode, { "MyBarcode" } },
{ TagType::Comment, { "Comment1", "Comment2" } },
{ TagType::Compilation, { "1" } },
{ TagType::Composer, { "MyComposer1", "MyComposer2" } },
@@ -208,6 +209,7 @@ namespace lms::metadata
EXPECT_EQ(track->medium->release->artists[1].sortName, "MyAlbumArtist2SortName");
EXPECT_EQ(track->medium->release->artists[1].mbid, core::UUID::fromString("5ed3d6b3-2aed-4a03-828c-3c4d4f7406e1"));
EXPECT_TRUE(track->medium->release->isCompilation);
EXPECT_EQ(track->medium->release->barcode, "MyBarcode");
ASSERT_EQ(track->medium->release->labels.size(), 2);
EXPECT_EQ(track->medium->release->labels[0], "Label1");
EXPECT_EQ(track->medium->release->labels[1], "Label2");