diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-10-12 19:48:39 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-10-12 19:48:39 +0000 |
| commit | e48a196c880d9f92804c6e1e3ea5631ae2017dd1 (patch) | |
| tree | 6767f170f669cdfaea23e469050c05ad1f6c67ca /src/plugins/Input/mpc/decodermpcfactory.cpp | |
| parent | 0a74e1c0e3781afe041ba9acc361461cc3ebda82 (diff) | |
| download | qmmp-e48a196c880d9f92804c6e1e3ea5631ae2017dd1.tar.gz qmmp-e48a196c880d9f92804c6e1e3ea5631ae2017dd1.tar.bz2 qmmp-e48a196c880d9f92804c6e1e3ea5631ae2017dd1.zip | |
enabled all input plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@581 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mpc/decodermpcfactory.cpp')
| -rw-r--r-- | src/plugins/Input/mpc/decodermpcfactory.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
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<FileInfo *> 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 <FileInfo*> list; + list << info; + return list; } QObject* DecoderMPCFactory::showDetails(QWidget *parent, const QString &path) |
