From e48a196c880d9f92804c6e1e3ea5631ae2017dd1 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 12 Oct 2008 19:48:39 +0000 Subject: enabled all input plugins git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@581 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/mpc/decodermpcfactory.cpp | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/plugins/Input/mpc/decodermpcfactory.cpp') diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp index e0caab970..9b6368efe 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.cpp +++ b/src/plugins/Input/mpc/decodermpcfactory.cpp @@ -53,38 +53,38 @@ const DecoderProperties DecoderMPCFactory::properties() const } Decoder *DecoderMPCFactory::create(QObject *parent, QIODevice *input, - Output *output) + Output *output, const QString &) { return new DecoderMPC(parent, this, input, output); } -FileTag *DecoderMPCFactory::createTag(const QString &source) +QList DecoderMPCFactory::createPlayList(const QString &fileName) { - FileTag *ftag = new FileTag(); + FileInfo *info = new FileInfo(fileName); - TagLib::FileRef fileRef(source.toLocal8Bit ()); + TagLib::FileRef fileRef(fileName.toLocal8Bit ()); TagLib::Tag *tag = fileRef.tag(); - if (tag && !tag->isEmpty()) { - ftag->setValue(FileTag::ALBUM, + info->setMetaData(Qmmp::ALBUM, QString::fromUtf8(tag->album().toCString(TRUE)).trimmed()); - ftag->setValue(FileTag::ARTIST, + info->setMetaData(Qmmp::ARTIST, QString::fromUtf8(tag->artist().toCString(TRUE)).trimmed()); - ftag->setValue(FileTag::COMMENT, + info->setMetaData(Qmmp::COMMENT, QString::fromUtf8(tag->comment().toCString(TRUE)).trimmed()); - ftag->setValue(FileTag::GENRE, + info->setMetaData(Qmmp::GENRE, QString::fromUtf8(tag->genre().toCString(TRUE)).trimmed()); - ftag->setValue(FileTag::TITLE, + info->setMetaData(Qmmp::TITLE, QString::fromUtf8(tag->title().toCString(TRUE)).trimmed()); - ftag->setValue(FileTag::YEAR, tag->year()); - ftag->setValue(FileTag::TRACK, tag->track()); + info->setMetaData(Qmmp::YEAR, tag->year()); + info->setMetaData(Qmmp::TRACK, tag->track()); } - if (fileRef.audioProperties()) - ftag->setValue(FileTag::LENGTH, fileRef.audioProperties()->length()); + info->setLength(fileRef.audioProperties()->length()); - return ftag; + QList list; + list << info; + return list; } QObject* DecoderMPCFactory::showDetails(QWidget *parent, const QString &path) -- cgit v1.2.3-13-gbd6f