From 3bdee5521711f338b9ce0701d51543bee24008fc Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Sat, 5 Mar 2005 22:24:10 +0000 Subject: added composer, performer, and comment metadata items git-svn-id: https://svn.musicpd.org/mpd/trunk@3022 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/flac_plugin.c | 10 ++++++++++ src/inputPlugins/ogg_plugin.c | 8 ++++++++ 2 files changed, 18 insertions(+) (limited to 'src/inputPlugins') 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++; } -- cgit v1.2.3