diff options
author | Max Kellermann <max@musicpd.org> | 2018-10-22 12:42:18 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-10-22 12:42:18 +0200 |
commit | 7cfe929c3692e74f4e6073960eaf0e08a9989811 (patch) | |
tree | 71fdb51f140d79907e6961412cf25d0399a8fd19 /src/tag | |
parent | 6c06244e83a7accb8fece35d755ad69f7102cb4a (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.hxx | 8 |
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 |