aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-31 08:24:05 +0200
committerMax Kellermann <max@duempel.org>2010-05-31 08:24:05 +0200
commit71da5b026cc5b76f546754df3e75f9c41c28b5b4 (patch)
tree82cc23d5b3cf1b5c8d2f7f5ec91a80528e6bd567 /src
parent2f68ea635b7ad809e18a59d2749341e9d0557658 (diff)
downloadmpd-71da5b026cc5b76f546754df3e75f9c41c28b5b4.tar.gz
mpd-71da5b026cc5b76f546754df3e75f9c41c28b5b4.tar.xz
mpd-71da5b026cc5b76f546754df3e75f9c41c28b5b4.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.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/tag_ape.c b/src/tag_ape.c
index d6da37a1f..4841b3138 100644
--- a/src/tag_ape.c
+++ b/src/tag_ape.c
@@ -28,26 +28,18 @@
#include <stdio.h>
static const char *const ape_tag_names[TAG_NUM_OF_ITEM_TYPES] = {
- [TAG_TITLE] = "title",
- [TAG_ARTIST] = "artist",
- [TAG_ARTIST_SORT] = "artistsort",
- [TAG_ALBUM] = "album",
[TAG_ALBUM_ARTIST] = "album artist",
- [TAG_ALBUM_ARTIST_SORT] = "albumartistsort",
- [TAG_COMMENT] = "comment",
- [TAG_GENRE] = "genre",
- [TAG_TRACK] = "track",
[TAG_DATE] = "year",
- [TAG_MUSICBRAINZ_ARTISTID] = "musicbrainz_artistid",
- [TAG_MUSICBRAINZ_ALBUMID] = "musicbrainz_albumid",
- [TAG_MUSICBRAINZ_ALBUMARTISTID] = "musicbrainz_albumartistid",
- [TAG_MUSICBRAINZ_TRACKID] = "musicbrainz_trackid",
};
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 *