aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inputPlugins/flac_plugin.c10
-rw-r--r--src/inputPlugins/ogg_plugin.c8
-rw-r--r--src/tag.c14
-rw-r--r--src/tag.h5
4 files changed, 35 insertions, 2 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index a9e5a8e9e..9c20a996d 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -499,6 +499,16 @@ static MpdTag * copyVorbisCommentBlockToMpdTag(FLAC__StreamMetadata * block,
block->data.vorbis_comment.comments+i,
TAG_ITEM_DATE,
&tag));
+ else if(commentMatchesAddToTag(
+ "composer=",
+ block->data.vorbis_comment.comments+i,
+ TAG_ITEM_COMPOSER,
+ &tag));
+ else if(commentMatchesAddToTag(
+ "performer=",
+ block->data.vorbis_comment.comments+i,
+ TAG_ITEM_PERFORMER,
+ &tag));
}
return tag;
diff --git a/src/inputPlugins/ogg_plugin.c b/src/inputPlugins/ogg_plugin.c
index 472c2f229..137c4176c 100644
--- a/src/inputPlugins/ogg_plugin.c
+++ b/src/inputPlugins/ogg_plugin.c
@@ -164,6 +164,14 @@ MpdTag * oggCommentsParse(char ** comments) {
if(!ret) ret = newMpdTag();
addItemToMpdTag(ret, TAG_ITEM_DATE, temp);
}
+ else if((temp = ogg_parseComment(*comments,"composer"))) {
+ if(!ret) ret = newMpdTag();
+ addItemToMpdTag(ret, TAG_ITEM_COMPOSER, temp);
+ }
+ else if((temp = ogg_parseComment(*comments,"performer"))) {
+ if(!ret) ret = newMpdTag();
+ addItemToMpdTag(ret, TAG_ITEM_PERFORMER, temp);
+ }
comments++;
}
diff --git a/src/tag.c b/src/tag.c
index ab32445f8..7b1b8e837 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -42,6 +42,12 @@
#include <FLAC/metadata.h>
#endif
+#ifdef HAVE_ID3TAG
+#ifndef ID3_FRAME_COMPOSER
+#define ID3_FRAME_COMPOSER "TCOM"
+#endif
+#endif
+
char * mpdTagItemKeys[TAG_NUM_OF_ITEM_TYPES] =
{
"Artist",
@@ -50,7 +56,10 @@ char * mpdTagItemKeys[TAG_NUM_OF_ITEM_TYPES] =
"Track",
"Name",
"Genre",
- "Date"
+ "Date",
+ "Composer",
+ "Performer",
+ "Comment"
};
static mpd_sint8 ignoreTagItems[TAG_NUM_OF_ITEM_TYPES];
@@ -70,6 +79,7 @@ void initTagConfig() {
/* parse the "metadata_to_use" config parameter below */
memset(ignoreTagItems, 0, TAG_NUM_OF_ITEM_TYPES);
+ ignoreTagItems[TAG_ITEM_COMMENT] = 1; /* ignore comments by default */
param = getConfigParam(CONF_METADATA_TO_USE);
@@ -174,6 +184,8 @@ MpdTag * parseId3Tag(struct id3_tag * tag) {
ret = getID3Info(tag, ID3_FRAME_TRACK, TAG_ITEM_TRACK, ret);
ret = getID3Info(tag, ID3_FRAME_YEAR, TAG_ITEM_DATE, ret);
ret = getID3Info(tag, ID3_FRAME_GENRE, TAG_ITEM_GENRE, ret);
+ ret = getID3Info(tag, ID3_FRAME_COMPOSER, TAG_ITEM_COMPOSER, ret);
+ ret = getID3Info(tag, ID3_FRAME_COMMENT, TAG_ITEM_COMMENT, ret);
return ret;
}
diff --git a/src/tag.h b/src/tag.h
index 03eb8c7bf..ffe0c0d49 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -41,8 +41,11 @@
#define TAG_ITEM_NAME 4
#define TAG_ITEM_GENRE 5
#define TAG_ITEM_DATE 6
+#define TAG_ITEM_COMPOSER 7
+#define TAG_ITEM_PERFORMER 8
+#define TAG_ITEM_COMMENT 9
-#define TAG_NUM_OF_ITEM_TYPES 7
+#define TAG_NUM_OF_ITEM_TYPES 10
extern char * mpdTagItemKeys[];