aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-06-30 21:30:31 +0200
committerMax Kellermann <max@duempel.org>2010-06-30 21:33:19 +0200
commit284659034d7ec0add185e03a27434b2bd7d88216 (patch)
tree45db0d8283beea4842238b45836093edc92d89f6 /src
parent9550c87327cdb0c97ca855bc5d77d28cbbb723d5 (diff)
downloadmpd-284659034d7ec0add185e03a27434b2bd7d88216.tar.gz
mpd-284659034d7ec0add185e03a27434b2bd7d88216.tar.xz
mpd-284659034d7ec0add185e03a27434b2bd7d88216.zip
tag_ape: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
Diffstat (limited to '')
-rw-r--r--src/tag_ape.c12
1 files changed, 5 insertions, 7 deletions
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 <stdio.h>
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 *