From 71da5b026cc5b76f546754df3e75f9c41c28b5b4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 31 May 2010 08:24:05 +0200 Subject: tag_ape: remove duplicate entries in the tag name table Reuse the function tag_name_parse_i(). --- src/tag_ape.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src') 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 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 * -- cgit v1.2.3