db/Helpers: "list" on album artist falls back to the artist tag

This commit is contained in:
Max Kellermann 2014-04-24 10:48:52 +02:00
parent 986dd2fac1
commit 27002ad1ea
2 changed files with 5 additions and 1 deletions

1
NEWS
View File

@ -5,6 +5,7 @@ ver 0.19 (not yet released)
- "listneighbors" lists file servers on the local network
- "playlistadd" supports file:///
- "idle" with unrecognized event name fails
- "list" on album artist falls back to the artist tag
* database
- proxy: forward "idle" events
- proxy: copy "Last-Modified" from remote directories

View File

@ -58,7 +58,10 @@ CollectTags(StringSet &set, TagType tag_type, const LightSong &song)
assert(song.tag != nullptr);
const Tag &tag = *song.tag;
if (!CheckUniqueTag(set, tag, tag_type))
if (!CheckUniqueTag(set, tag, tag_type) &&
(tag_type != TAG_ALBUM_ARTIST ||
/* fall back to "Artist" if no "AlbumArtist" was found */
!CheckUniqueTag(set, tag, TAG_ARTIST)))
set.insert("");
return true;