aboutsummaryrefslogtreecommitdiff
path: root/src/tag_id3.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-02-11 19:24:51 +0100
committerMax Kellermann <max@duempel.org>2012-02-12 13:41:48 +0100
commitffea273a28179d2b5bbc24f967517bcf80940c63 (patch)
tree5891ed63a60ba0eed7c2b4433ea72f566f982822 /src/tag_id3.c
parent1783aac4384ccc53d9ad25c237d4286ccdbccbc0 (diff)
tag_handler: handle arbitrary name/value pairs
The new method pair() receives an arbitrary name/value pair. Support for this is being added to a few decoder plugins.
Diffstat (limited to 'src/tag_id3.c')
-rw-r--r--src/tag_id3.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/tag_id3.c b/src/tag_id3.c
index 8becb481..05870152 100644
--- a/src/tag_id3.c
+++ b/src/tag_id3.c
@@ -282,18 +282,21 @@ tag_id3_import_musicbrainz(struct id3_tag *id3_tag,
if (name == NULL)
continue;
- type = tag_id3_parse_txxx_name((const char*)name);
- free(name);
-
- if (type == TAG_NUM_OF_ITEM_TYPES)
- continue;
-
value = tag_id3_getstring(frame, 2);
if (value == NULL)
continue;
- tag_handler_invoke_tag(handler, handler_ctx,
- type, (const char*)value);
+ tag_handler_invoke_pair(handler, handler_ctx,
+ (const char *)name,
+ (const char *)value);
+
+ type = tag_id3_parse_txxx_name((const char*)name);
+ free(name);
+
+ if (type != TAG_NUM_OF_ITEM_TYPES)
+ tag_handler_invoke_tag(handler, handler_ctx,
+ type, (const char*)value);
+
free(value);
}
}