diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-22 10:44:36 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-22 10:46:26 +0200 |
commit | 0340b01392a750a086b19abfdc47672308e0a2da (patch) | |
tree | 8f17b5b4318987b1ff715cd8d5dd224a6316c4fb /src/db | |
parent | 94aed92e9ad3da465a0f9aa6a65ad1746061fc62 (diff) |
db/Count: use ApplyTagFallback()
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/Count.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/db/Count.cxx b/src/db/Count.cxx index 9c3945677..72f492ee3 100644 --- a/src/db/Count.cxx +++ b/src/db/Count.cxx @@ -25,6 +25,7 @@ #include "client/Response.hxx" #include "LightSong.hxx" #include "tag/Tag.hxx" +#include "tag/Fallback.hxx" #include <functional> #include <map> @@ -98,9 +99,9 @@ GroupCountVisitor(TagCountMap &map, TagType group, const LightSong &song) assert(song.tag != nullptr); const Tag &tag = *song.tag; - if (!CollectGroupCounts(map, group, tag) && group == TAG_ALBUM_ARTIST) - /* fall back to "Artist" if no "AlbumArtist" was found */ - CollectGroupCounts(map, TAG_ARTIST, tag); + ApplyTagWithFallback(group, + std::bind(CollectGroupCounts, std::ref(map), + std::placeholders::_1, std::cref(tag))); } void |