aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/flac/decoderflacfactory.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-11-28 15:46:53 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-11-28 15:46:53 +0000
commit26724c66d4764a77ca653ce6c0a1573e9e97e97c (patch)
treef238f84ed390de31471cb95a20e3775f2ea7e3e7 /src/plugins/Input/flac/decoderflacfactory.cpp
parentd02787b92ad9a220539498ebbc9f1745a075d10d (diff)
downloadqmmp-26724c66d4764a77ca653ce6c0a1573e9e97e97c.tar.gz
qmmp-26724c66d4764a77ca653ce6c0a1573e9e97e97c.tar.bz2
qmmp-26724c66d4764a77ca653ce6c0a1573e9e97e97c.zip
changed decoder api; fixed flac plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@646 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/flac/decoderflacfactory.cpp')
-rw-r--r--src/plugins/Input/flac/decoderflacfactory.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp
index 2da4c69de..df3ef6dd3 100644
--- a/src/plugins/Input/flac/decoderflacfactory.cpp
+++ b/src/plugins/Input/flac/decoderflacfactory.cpp
@@ -64,12 +64,12 @@ Decoder *DecoderFLACFactory::create(QObject *parent, QIODevice *input,
return new DecoderFLAC(parent, this, input, output, path);
}
-QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName)
+QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName, bool useMetaData)
{
FileInfo *info = new FileInfo(fileName);
TagLib::FLAC::File fileRef(fileName.toLocal8Bit ());
- TagLib::Tag *tag = fileRef.tag();
+ TagLib::Tag *tag = useMetaData ? fileRef.tag() : 0;
if (tag && !tag->isEmpty())
{
@@ -91,11 +91,10 @@ QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName)
info->setLength(fileRef.audioProperties()->length());
//looking for cuesheet comment
- TagLib::Ogg::XiphComment *xiph_comment = fileRef.xiphComment();
+ TagLib::Ogg::XiphComment *xiph_comment = useMetaData ? fileRef.xiphComment() : 0;
QList <FileInfo*> list;
if (xiph_comment && xiph_comment->fieldListMap().contains("CUESHEET"))
{
- qDebug(xiph_comment->fieldListMap()["CUESHEET"].toString().toCString(TRUE));
CUEParser parser(xiph_comment->fieldListMap()["CUESHEET"].toString().toCString(TRUE), fileName);
list = parser.createPlayList();
delete info;