From 26724c66d4764a77ca653ce6c0a1573e9e97e97c Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 28 Nov 2008 15:46:53 +0000 Subject: 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 --- src/plugins/Input/flac/decoderflacfactory.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins/Input/flac/decoderflacfactory.cpp') 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 DecoderFLACFactory::createPlayList(const QString &fileName) +QList 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 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 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; -- cgit v1.2.3-13-gbd6f