diff options
Diffstat (limited to 'src/plugins/Input/flac/decoderflacfactory.cpp')
| -rw-r--r-- | src/plugins/Input/flac/decoderflacfactory.cpp | 7 |
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; |
