tag_ape: remove duplicate entries in the tag name table

Reuse the function tag_name_parse_i().
This commit is contained in:
Max Kellermann 2010-05-31 08:24:05 +02:00
parent 2f68ea635b
commit 71da5b026c
1 changed files with 5 additions and 13 deletions

View File

@ -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 *