aboutsummaryrefslogtreecommitdiff
path: root/src/tag_ape.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-31 08:22:53 +0200
committerMax Kellermann <max@duempel.org>2010-05-31 08:22:53 +0200
commit2f68ea635b7ad809e18a59d2749341e9d0557658 (patch)
tree83e3cdb42aafb7316118222b5abee59d6dcfeb29 /src/tag_ape.c
parentca08c4dbf42bdf459be51f4a3955a39aa813a8d6 (diff)
tag_ape: move code to tag_ape_name_parse()
Diffstat (limited to 'src/tag_ape.c')
-rw-r--r--src/tag_ape.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tag_ape.c b/src/tag_ape.c
index d527a13d..d6da37a1 100644
--- a/src/tag_ape.c
+++ b/src/tag_ape.c
@@ -44,6 +44,12 @@ static const char *const ape_tag_names[TAG_NUM_OF_ITEM_TYPES] = {
[TAG_MUSICBRAINZ_TRACKID] = "musicbrainz_trackid",
};
+static enum tag_type
+tag_ape_name_parse(const char *name)
+{
+ return tag_table_lookup(ape_tag_names, name);
+}
+
static struct tag *
tag_ape_import_item(struct tag *tag, unsigned long flags,
const char *key, const char *value, size_t value_length)
@@ -52,7 +58,7 @@ tag_ape_import_item(struct tag *tag, unsigned long flags,
if ((flags & (0x3 << 1)) != 0)
return tag;
- enum tag_type type = tag_table_lookup(ape_tag_names, key);
+ enum tag_type type = tag_ape_name_parse(key);
if (type == TAG_NUM_OF_ITEM_TYPES)
return tag;