From 6f87164ad6027246b595bfe072aa0d7a40f949cb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 26 Oct 2013 16:00:05 +0200 Subject: ApeTag: support multiple values per name --- src/tag/ApeTag.cxx | 9 +++++++-- 1 file 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, -- cgit v1.2.3