aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-06-30 21:30:21 +0200
committerMax Kellermann <max@duempel.org>2010-06-30 21:30:21 +0200
commite223e8a5b58509287098cb1deffb9655c7249a0c (patch)
tree836b42508e16acf541fe9c0b1a0303a4e019bbc7
parent4d6d372a5b8f7903bbcbec943587c593ac08df3c (diff)
downloadmpd-e223e8a5b58509287098cb1deffb9655c7249a0c.tar.gz
mpd-e223e8a5b58509287098cb1deffb9655c7249a0c.tar.xz
mpd-e223e8a5b58509287098cb1deffb9655c7249a0c.zip
tag_ape: move code to tag_ape_name_parse()
Diffstat (limited to '')
-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 0e8f67456..733dab35a 100644
--- a/src/tag_ape.c
+++ b/src/tag_ape.c
@@ -37,6 +37,12 @@ static const char *const ape_tag_names[TAG_NUM_OF_ITEM_TYPES] = {
[TAG_ITEM_DATE] = "year"
};
+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)
@@ -45,7 +51,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;