aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-26 16:00:05 +0200
committerMax Kellermann <max@duempel.org>2013-10-26 16:00:05 +0200
commit6f87164ad6027246b595bfe072aa0d7a40f949cb (patch)
treec628e1da8b2bf233ea258e34254874cce703c5f6
parenta4d82cfe1eb388b0552a20703116def53046774f (diff)
downloadmpd-6f87164ad6027246b595bfe072aa0d7a40f949cb.tar.gz
mpd-6f87164ad6027246b595bfe072aa0d7a40f949cb.tar.xz
mpd-6f87164ad6027246b595bfe072aa0d7a40f949cb.zip
ApeTag: support multiple values per name
Diffstat (limited to '')
-rw-r--r--src/tag/ApeTag.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tag/ApeTag.cxx b/src/tag/ApeTag.cxx
index f33bf1353..2df53947a 100644
--- a/src/tag/ApeTag.cxx
+++ b/src/tag/ApeTag.cxx
@@ -83,13 +83,18 @@ tag_ape_import_item(unsigned long flags,
if ((flags & (0x3 << 1)) != 0)
return false;
- tag_handler_invoke_pair(handler, handler_ctx, key, value);
+ const char *const end = value + value_length;
+
+ if (handler->pair != nullptr)
+ ForEachValue(value, end, [handler, handler_ctx,
+ key](const char *_value) {
+ handler->pair(key, _value, handler_ctx);
+ });
TagType type = tag_ape_name_parse(key);
if (type == TAG_NUM_OF_ITEM_TYPES)
return false;
- const char *end = value + value_length;
ForEachValue(value, end, [handler, handler_ctx,
type](const char *_value) {
tag_handler_invoke_tag(handler, handler_ctx,