From 284659034d7ec0add185e03a27434b2bd7d88216 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jun 2010 21:30:31 +0200 Subject: tag_ape: remove duplicate entries in the tag name table Reuse the function tag_name_parse_i(). --- src/tag_ape.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/tag_ape.c') diff --git a/src/tag_ape.c b/src/tag_ape.c index 733dab35a..babefcda3 100644 --- a/src/tag_ape.c +++ b/src/tag_ape.c @@ -27,20 +27,18 @@ #include static const char *const ape_tag_names[TAG_NUM_OF_ITEM_TYPES] = { - [TAG_ITEM_TITLE] = "title", - [TAG_ITEM_ARTIST] = "artist", - [TAG_ITEM_ALBUM] = "album", [TAG_ITEM_ALBUM_ARTIST] = "album artist", - [TAG_ITEM_COMMENT] = "comment", - [TAG_ITEM_GENRE] = "genre", - [TAG_ITEM_TRACK] = "track", [TAG_ITEM_DATE] = "year" }; static enum tag_type tag_ape_name_parse(const char *name) { - return tag_table_lookup(ape_tag_names, name); + enum tag_type type = tag_table_lookup(ape_tag_names, name); + if (type == TAG_NUM_OF_ITEM_TYPES) + type = tag_name_parse_i(name); + + return type; } static struct tag * -- cgit v1.2.3