From 12746dbfb28759b831aaf02e5b542cfa55be3fb5 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 8 Aug 2009 10:13:21 +0000 Subject: mpeg plugin: added support for comment and disc number tags git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1120 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/mad/decodermadfactory.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/plugins/Input/mad/decodermadfactory.cpp') diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index 2574cd028..fd45987c7 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -99,7 +99,6 @@ Decoder *DecoderMADFactory::create(QObject *parent, QIODevice *input, Output *ou return new DecoderMAD(parent, this, input, output); } -//FileInfo *DecoderMADFactory::createFileInfo(const QString &source) QList DecoderMADFactory::createPlayList(const QString &fileName, bool useMetaData) { FileInfo *info = new FileInfo(fileName); @@ -183,6 +182,22 @@ QList DecoderMADFactory::createPlayList(const QString &fileName, boo tag->year()); info->setMetaData(Qmmp::TRACK, tag->track()); + + if(tag == fileRef.ID3v2Tag()) + { + if(!fileRef.ID3v2Tag()->frameListMap()["TCOM"].isEmpty()) + { + TagLib::String composer; + composer = fileRef.ID3v2Tag()->frameListMap()["TCOM"].front()->toString(); + info->setMetaData(Qmmp::COMPOSER, + codec->toUnicode(composer.toCString(utf)).trimmed()); + } + if(!fileRef.ID3v2Tag()->frameListMap()["TPOS"].isEmpty()) + { + TagLib::String disc = fileRef.ID3v2Tag()->frameListMap()["TPOS"].front()->toString(); + info->setMetaData(Qmmp::DISCNUMBER, QString(disc.toCString()).trimmed()); + } + } } } if (fileRef.audioProperties()) -- cgit v1.2.3-13-gbd6f