summaryrefslogtreecommitdiff
path: root/src/tag
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-22 12:42:18 +0200
committerMax Kellermann <max@musicpd.org>2018-10-22 12:42:18 +0200
commit7cfe929c3692e74f4e6073960eaf0e08a9989811 (patch)
tree71fdb51f140d79907e6961412cf25d0399a8fd19 /src/tag
parent6c06244e83a7accb8fece35d755ad69f7102cb4a (diff)
db/Count: print empty group if song without grouped tag exists
Be consistent with "list" responses.
Diffstat (limited to 'src/tag')
-rw-r--r--src/tag/VisitFallback.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tag/VisitFallback.hxx b/src/tag/VisitFallback.hxx
index 3ad486f5f..23992d44b 100644
--- a/src/tag/VisitFallback.hxx
+++ b/src/tag/VisitFallback.hxx
@@ -49,4 +49,12 @@ VisitTagWithFallback(const Tag &tag, TagType type, F &&f) noexcept
});
}
+template<typename F>
+void
+VisitTagWithFallbackOrEmpty(const Tag &tag, TagType type, F &&f) noexcept
+{
+ if (!VisitTagWithFallback(tag, type, f))
+ f("");
+}
+
#endif