aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-01-02 15:43:08 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2020-01-02 15:43:08 +0000
commit0922eb823e75717188d9a317dacf8ba8f5a49204 (patch)
treea364bb48d9564d6efa32dd9f41307d7157c195eb /src
parent68662a3db8632f76dfa7b43b24ddbdad6dd5e9cd (diff)
downloadqmmp-0922eb823e75717188d9a317dacf8ba8f5a49204.tar.gz
qmmp-0922eb823e75717188d9a317dacf8ba8f5a49204.tar.bz2
qmmp-0922eb823e75717188d9a317dacf8ba8f5a49204.zip
ffmpeg: added 'album artist' and 'composer' tags support (#1028)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9175 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
index 53beb5ba1..3a0f112c9 100644
--- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
+++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp
@@ -172,9 +172,11 @@ bool DecoderFFmpeg::initialize()
AVDictionaryEntry *album = av_dict_get(ic->metadata,"album",nullptr,0);
if(!album)
album = av_dict_get(ic->metadata,"WM/AlbumTitle",nullptr,0);
+ AVDictionaryEntry *album_artist = av_dict_get(ic->metadata,"album_artist",nullptr,0);
AVDictionaryEntry *artist = av_dict_get(ic->metadata,"artist",nullptr,0);
if(!artist)
artist = av_dict_get(ic->metadata,"author",nullptr,0);
+ AVDictionaryEntry *composer = av_dict_get(ic->metadata,"composer",nullptr,0);
AVDictionaryEntry *comment = av_dict_get(ic->metadata,"comment",nullptr,0);
AVDictionaryEntry *genre = av_dict_get(ic->metadata,"genre",nullptr,0);
AVDictionaryEntry *title = av_dict_get(ic->metadata,"title",nullptr,0);
@@ -189,10 +191,15 @@ bool DecoderFFmpeg::initialize()
if(!track)
track = av_dict_get(ic->metadata,"WM/TrackNumber",nullptr,0);
+
if(album)
metaData.insert(Qmmp::ALBUM, QString::fromUtf8(album->value).trimmed());
+ if(album_artist)
+ metaData.insert(Qmmp::ALBUMARTIST, QString::fromUtf8(album_artist->value).trimmed());
if(artist)
metaData.insert(Qmmp::ARTIST, QString::fromUtf8(artist->value).trimmed());
+ if(composer)
+ metaData.insert(Qmmp::COMPOSER, QString::fromUtf8(composer->value).trimmed());
if(comment)
metaData.insert(Qmmp::COMMENT, QString::fromUtf8(comment->value).trimmed());
if(genre)