summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-11-08 19:25:01 +0100
committerMax Kellermann <max@duempel.org>2014-11-08 19:25:01 +0100
commitb5ba94f1de06c621da937241eedfcfb100f26a09 (patch)
tree3f05f92e3445d47ddceafb81745dcf6079f19656
parentcbf79769d396449cfc9e5555c7419cc3f117e8d4 (diff)
tag/Set: do AlbumArtist/Artist fallback only if AlbumArtist is not disabled
On "list albumartist", songs that have no AlbumArtist tag will use the Artist tag. However, if AlbumArtist is disabled via "metadata_to_use", the TagBuilder::AddItem() call is ignored, and PrintUniqueTag() attempts to print a nullptr string. This commit fixes the problem by attempting the fallback only if AlbumArtist is not disabled.
-rw-r--r--NEWS2
-rw-r--r--src/tag/Set.cxx2
2 files changed, 4 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 94ce8d4ba..f18e9ff0f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
ver 0.19.3 (not yet released)
+* protocol
+ - fix "(null)" result string to "list" when AlbumArtist is disabled
* database
- upnp: fix breakage due to malformed URIs
* decoder
diff --git a/src/tag/Set.cxx b/src/tag/Set.cxx
index 47a8423bf..6a55a450f 100644
--- a/src/tag/Set.cxx
+++ b/src/tag/Set.cxx
@@ -19,6 +19,7 @@
#include "Set.hxx"
#include "TagBuilder.hxx"
+#include "TagSettings.h"
#include <assert.h>
@@ -109,6 +110,7 @@ TagSet::InsertUnique(const Tag &tag,
if (!CheckUnique(type, tag, type, group_mask) &&
(type != TAG_ALBUM_ARTIST ||
+ ignore_tag_items[TAG_ALBUM_ARTIST] ||
/* fall back to "Artist" if no "AlbumArtist" was found */
!CheckUnique(type, tag, TAG_ARTIST, group_mask)))
InsertUnique(tag, type, nullptr, group_mask);