aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/mad/decodermadfactory.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-08-08 10:13:21 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-08-08 10:13:21 +0000
commit12746dbfb28759b831aaf02e5b542cfa55be3fb5 (patch)
treedac95f36328f136b09cf64d87eadd2b336dcbafb /src/plugins/Input/mad/decodermadfactory.cpp
parent31b71619fe8e73ad571c710a3b0b874540fccef0 (diff)
downloadqmmp-12746dbfb28759b831aaf02e5b542cfa55be3fb5.tar.gz
qmmp-12746dbfb28759b831aaf02e5b542cfa55be3fb5.tar.bz2
qmmp-12746dbfb28759b831aaf02e5b542cfa55be3fb5.zip
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
Diffstat (limited to 'src/plugins/Input/mad/decodermadfactory.cpp')
-rw-r--r--src/plugins/Input/mad/decodermadfactory.cpp17
1 files changed, 16 insertions, 1 deletions
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<FileInfo *> DecoderMADFactory::createPlayList(const QString &fileName, bool useMetaData)
{
FileInfo *info = new FileInfo(fileName);
@@ -183,6 +182,22 @@ QList<FileInfo *> 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())