aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-13 16:12:45 +0200
committerMax Kellermann <max@duempel.org>2009-10-13 16:12:45 +0200
commitea616b3ed4c1e94f29ac32bcd7751943e2d647a0 (patch)
treead7aab07cba992b1aa728466bc1ffe5ca9e1e1a0 /src/decoder
parenta9dc0e816c0b6c0ed19a584225e3fe6251f1a4c6 (diff)
downloadmpd-ea616b3ed4c1e94f29ac32bcd7751943e2d647a0.tar.gz
mpd-ea616b3ed4c1e94f29ac32bcd7751943e2d647a0.tar.xz
mpd-ea616b3ed4c1e94f29ac32bcd7751943e2d647a0.zip
tag: removed the "_ITEM_" suffix from the enum names
Diffstat (limited to '')
-rw-r--r--src/decoder/_flac_common.c6
-rw-r--r--src/decoder/ffmpeg_plugin.c31
-rw-r--r--src/decoder/flac_plugin.c7
-rw-r--r--src/decoder/mikmod_plugin.c2
-rw-r--r--src/decoder/modplug_plugin.c2
-rw-r--r--src/decoder/mp4ff_plugin.c16
-rw-r--r--src/decoder/sidplay_plugin.cxx8
-rw-r--r--src/decoder/sndfile_decoder_plugin.c6
-rwxr-xr-xsrc/decoder/vorbis_plugin.c6
-rw-r--r--src/decoder/wavpack_plugin.c22
10 files changed, 51 insertions, 55 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c
index 09f7269bd..d8802a6a3 100644
--- a/src/decoder/_flac_common.c
+++ b/src/decoder/_flac_common.c
@@ -170,11 +170,11 @@ flac_parse_comment(struct tag *tag, const char *char_tnum,
assert(tag != NULL);
if (flac_copy_comment(tag, entry, VORBIS_COMMENT_TRACK_KEY,
- TAG_ITEM_TRACK, char_tnum) ||
+ TAG_TRACK, char_tnum) ||
flac_copy_comment(tag, entry, VORBIS_COMMENT_DISC_KEY,
- TAG_ITEM_DISC, char_tnum) ||
+ TAG_DISC, char_tnum) ||
flac_copy_comment(tag, entry, "album artist",
- TAG_ITEM_ALBUM_ARTIST, char_tnum))
+ TAG_ALBUM_ARTIST, char_tnum))
return;
for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; ++i)
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 6bead85fd..be9de3bf2 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -363,37 +363,36 @@ static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx)
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0)
av_metadata_conv(f, NULL, f->iformat->metadata_conv);
- ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_TITLE, "title");
- if (!ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ARTIST, "author"))
- ffmpeg_copy_metadata(tag, f->metadata,
- TAG_ITEM_ARTIST, "artist");
- ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ALBUM, "album");
- ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_COMMENT, "comment");
- ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_GENRE, "genre");
- ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_TRACK, "track");
- ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_DATE, "year");
+ ffmpeg_copy_metadata(tag, f->metadata, TAG_TITLE, "title");
+ if (!ffmpeg_copy_metadata(tag, f->metadata, TAG_ARTIST, "author"))
+ ffmpeg_copy_metadata(tag, f->metadata, TAG_ARTIST, "artist");
+ ffmpeg_copy_metadata(tag, f->metadata, TAG_ALBUM, "album");
+ ffmpeg_copy_metadata(tag, f->metadata, TAG_COMMENT, "comment");
+ ffmpeg_copy_metadata(tag, f->metadata, TAG_GENRE, "genre");
+ ffmpeg_copy_metadata(tag, f->metadata, TAG_TRACK, "track");
+ ffmpeg_copy_metadata(tag, f->metadata, TAG_DATE, "year");
#else
if (f->author[0])
- tag_add_item(tag, TAG_ITEM_ARTIST, f->author);
+ tag_add_item(tag, TAG_ARTIST, f->author);
if (f->title[0])
- tag_add_item(tag, TAG_ITEM_TITLE, f->title);
+ tag_add_item(tag, TAG_TITLE, f->title);
if (f->album[0])
- tag_add_item(tag, TAG_ITEM_ALBUM, f->album);
+ tag_add_item(tag, TAG_ALBUM, f->album);
if (f->track > 0) {
char buffer[16];
snprintf(buffer, sizeof(buffer), "%d", f->track);
- tag_add_item(tag, TAG_ITEM_TRACK, buffer);
+ tag_add_item(tag, TAG_TRACK, buffer);
}
if (f->comment[0])
- tag_add_item(tag, TAG_ITEM_COMMENT, f->comment);
+ tag_add_item(tag, TAG_COMMENT, f->comment);
if (f->genre[0])
- tag_add_item(tag, TAG_ITEM_GENRE, f->genre);
+ tag_add_item(tag, TAG_GENRE, f->genre);
if (f->year > 0) {
char buffer[16];
snprintf(buffer, sizeof(buffer), "%d", f->year);
- tag_add_item(tag, TAG_ITEM_DATE, buffer);
+ tag_add_item(tag, TAG_DATE, buffer);
}
#endif
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index 89a812f52..bf0c76633 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -347,11 +347,8 @@ flac_cue_tag_load(const char *file)
if (tag == NULL)
tag = flac_tag_load(file, char_tnum);
- if (char_tnum != NULL)
- {
- tag_add_item( tag,
- TAG_ITEM_TRACK,
- char_tnum);
+ if (char_tnum != NULL) {
+ tag_add_item(tag, TAG_TRACK, char_tnum);
g_free(char_tnum);
}
diff --git a/src/decoder/mikmod_plugin.c b/src/decoder/mikmod_plugin.c
index e7b7bfb03..850232f34 100644
--- a/src/decoder/mikmod_plugin.c
+++ b/src/decoder/mikmod_plugin.c
@@ -220,7 +220,7 @@ static struct tag *modTagDup(const char *file)
title = g_strdup(Player_LoadTitle(path2));
g_free(path2);
if (title)
- tag_add_item(ret, TAG_ITEM_TITLE, title);
+ tag_add_item(ret, TAG_TITLE, title);
return ret;
}
diff --git a/src/decoder/modplug_plugin.c b/src/decoder/modplug_plugin.c
index 6c375e6a0..301c80674 100644
--- a/src/decoder/modplug_plugin.c
+++ b/src/decoder/modplug_plugin.c
@@ -188,7 +188,7 @@ static struct tag *mod_tagdup(const char *file)
title = g_strdup(ModPlug_GetName(f));
if (title)
- tag_add_item(ret, TAG_ITEM_TITLE, title);
+ tag_add_item(ret, TAG_TITLE, title);
g_free(title);
ModPlug_Unload(f);
diff --git a/src/decoder/mp4ff_plugin.c b/src/decoder/mp4ff_plugin.c
index d2c63f983..745d1e619 100644
--- a/src/decoder/mp4ff_plugin.c
+++ b/src/decoder/mp4ff_plugin.c
@@ -391,22 +391,22 @@ mp4_tag_dup(const char *file)
mp4ff_meta_get_by_index(mp4fh, i, &item, &value);
if (0 == g_ascii_strcasecmp("artist", item)) {
- tag_add_item(ret, TAG_ITEM_ARTIST, value);
+ tag_add_item(ret, TAG_ARTIST, value);
} else if (0 == g_ascii_strcasecmp("title", item)) {
- tag_add_item(ret, TAG_ITEM_TITLE, value);
+ tag_add_item(ret, TAG_TITLE, value);
} else if (0 == g_ascii_strcasecmp("album", item)) {
- tag_add_item(ret, TAG_ITEM_ALBUM, value);
+ tag_add_item(ret, TAG_ALBUM, value);
} else if (0 == g_ascii_strcasecmp("track", item)) {
- tag_add_item(ret, TAG_ITEM_TRACK, value);
+ tag_add_item(ret, TAG_TRACK, value);
} else if (0 == g_ascii_strcasecmp("disc", item)) {
/* Is that the correct id? */
- tag_add_item(ret, TAG_ITEM_DISC, value);
+ tag_add_item(ret, TAG_DISC, value);
} else if (0 == g_ascii_strcasecmp("genre", item)) {
- tag_add_item(ret, TAG_ITEM_GENRE, value);
+ tag_add_item(ret, TAG_GENRE, value);
} else if (0 == g_ascii_strcasecmp("date", item)) {
- tag_add_item(ret, TAG_ITEM_DATE, value);
+ tag_add_item(ret, TAG_DATE, value);
} else if (0 == g_ascii_strcasecmp("writer", item)) {
- tag_add_item(ret, TAG_ITEM_COMPOSER, value);
+ tag_add_item(ret, TAG_COMPOSER, value);
}
free(item);
diff --git a/src/decoder/sidplay_plugin.cxx b/src/decoder/sidplay_plugin.cxx
index d97abd656..079b178fb 100644
--- a/src/decoder/sidplay_plugin.cxx
+++ b/src/decoder/sidplay_plugin.cxx
@@ -347,18 +347,18 @@ sidplay_tag_dup(const char *path_fs)
if(info.songs>1) {
char *tag_title=g_strdup_printf("%s (%d/%d)",
title, song_num, info.songs);
- tag_add_item(tag, TAG_ITEM_TITLE, tag_title);
+ tag_add_item(tag, TAG_TITLE, tag_title);
g_free(tag_title);
} else
- tag_add_item(tag, TAG_ITEM_TITLE, title);
+ tag_add_item(tag, TAG_TITLE, title);
/* artist */
if (info.numberOfInfoStrings > 1 && info.infoString[1] != NULL)
- tag_add_item(tag, TAG_ITEM_ARTIST, info.infoString[1]);
+ tag_add_item(tag, TAG_ARTIST, info.infoString[1]);
/* track */
char *track=g_strdup_printf("%d", song_num);
- tag_add_item(tag, TAG_ITEM_TRACK, track);
+ tag_add_item(tag, TAG_TRACK, track);
g_free(track);
/* time */
diff --git a/src/decoder/sndfile_decoder_plugin.c b/src/decoder/sndfile_decoder_plugin.c
index 4cc64459f..59993ef89 100644
--- a/src/decoder/sndfile_decoder_plugin.c
+++ b/src/decoder/sndfile_decoder_plugin.c
@@ -190,15 +190,15 @@ sndfile_tag_dup(const char *path_fs)
p = sf_get_string(sf, SF_STR_TITLE);
if (p != NULL)
- tag_add_item(tag, TAG_ITEM_TITLE, p);
+ tag_add_item(tag, TAG_TITLE, p);
p = sf_get_string(sf, SF_STR_ARTIST);
if (p != NULL)
- tag_add_item(tag, TAG_ITEM_ARTIST, p);
+ tag_add_item(tag, TAG_ARTIST, p);
p = sf_get_string(sf, SF_STR_DATE);
if (p != NULL)
- tag_add_item(tag, TAG_ITEM_DATE, p);
+ tag_add_item(tag, TAG_DATE, p);
sf_close(sf);
diff --git a/src/decoder/vorbis_plugin.c b/src/decoder/vorbis_plugin.c
index 39a075176..95f2de07a 100755
--- a/src/decoder/vorbis_plugin.c
+++ b/src/decoder/vorbis_plugin.c
@@ -176,11 +176,11 @@ vorbis_parse_comment(struct tag *tag, const char *comment)
assert(tag != NULL);
if (vorbis_copy_comment(tag, comment, VORBIS_COMMENT_TRACK_KEY,
- TAG_ITEM_TRACK) ||
+ TAG_TRACK) ||
vorbis_copy_comment(tag, comment, VORBIS_COMMENT_DISC_KEY,
- TAG_ITEM_DISC) ||
+ TAG_DISC) ||
vorbis_copy_comment(tag, comment, "album artist",
- TAG_ITEM_ALBUM_ARTIST))
+ TAG_ALBUM_ARTIST))
return;
for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; ++i)
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index f3d701144..3e7c0cef7 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -41,17 +41,17 @@ static struct {
const char *name;
enum tag_type type;
} tagtypes[] = {
- { "artist", TAG_ITEM_ARTIST },
- { "album", TAG_ITEM_ALBUM },
- { "title", TAG_ITEM_TITLE },
- { "track", TAG_ITEM_TRACK },
- { "name", TAG_ITEM_NAME },
- { "genre", TAG_ITEM_GENRE },
- { "date", TAG_ITEM_DATE },
- { "composer", TAG_ITEM_COMPOSER },
- { "performer", TAG_ITEM_PERFORMER },
- { "comment", TAG_ITEM_COMMENT },
- { "disc", TAG_ITEM_DISC },
+ { "artist", TAG_ARTIST },
+ { "album", TAG_ALBUM },
+ { "title", TAG_TITLE },
+ { "track", TAG_TRACK },
+ { "name", TAG_NAME },
+ { "genre", TAG_GENRE },
+ { "date", TAG_DATE },
+ { "composer", TAG_COMPOSER },
+ { "performer", TAG_PERFORMER },
+ { "comment", TAG_COMMENT },
+ { "disc", TAG_DISC },
};
/** A pointer type for format converter function. */