diff options
Diffstat (limited to 'src/plugins/Input')
32 files changed, 94 insertions, 74 deletions
diff --git a/src/plugins/Input/aac/decoderaacfactory.cpp b/src/plugins/Input/aac/decoderaacfactory.cpp index d054def12..38a9467c8 100644 --- a/src/plugins/Input/aac/decoderaacfactory.cpp +++ b/src/plugins/Input/aac/decoderaacfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -58,7 +58,7 @@ Decoder *DecoderAACFactory::create(const QString &, QIODevice *input) return new DecoderAAC(input); } -QList<FileInfo *> DecoderAACFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderAACFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { FileInfo *info = new FileInfo(fileName); diff --git a/src/plugins/Input/aac/decoderaacfactory.h b/src/plugins/Input/aac/decoderaacfactory.h index d306b35ce..40189858d 100644 --- a/src/plugins/Input/aac/decoderaacfactory.h +++ b/src/plugins/Input/aac/decoderaacfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2012 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -41,7 +41,7 @@ public: bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString&, QIODevice *); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp b/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp index 64d03ecad..0dc7bf75d 100644 --- a/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp +++ b/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2013 by Ilya Kotov * + * Copyright (C) 2009-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,7 @@ Decoder *DecoderCDAudioFactory::create(const QString &url, QIODevice *input) return new DecoderCDAudio(url); } -QList<FileInfo *> DecoderCDAudioFactory::createPlayList(const QString &url, bool useMetaData) +QList<FileInfo *> DecoderCDAudioFactory::createPlayList(const QString &url, bool useMetaData, QStringList *) { Q_UNUSED(useMetaData); QList <FileInfo*> list; diff --git a/src/plugins/Input/cdaudio/decodercdaudiofactory.h b/src/plugins/Input/cdaudio/decodercdaudiofactory.h index a63ea94d3..1227dfb37 100644 --- a/src/plugins/Input/cdaudio/decodercdaudiofactory.h +++ b/src/plugins/Input/cdaudio/decodercdaudiofactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2013 by Ilya Kotov * + * Copyright (C) 2009-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -38,7 +38,7 @@ public: bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); - QList<FileInfo *> createPlayList(const QString &url, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &url, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/cue/cueparser.cpp b/src/plugins/Input/cue/cueparser.cpp index d326ce8b1..7383e4111 100644 --- a/src/plugins/Input/cue/cueparser.cpp +++ b/src/plugins/Input/cue/cueparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2013 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -213,6 +213,23 @@ const QString CUEParser::filePath(int track) const return (track <= m_tracks.count()) ? m_tracks[track - 1]->file : QString(); } +const QStringList CUEParser::dataFiles() const +{ + QStringList files; + for(int i = 0; i < m_tracks.count(); ++i) + { + if(i == 0) + { + files << m_tracks[i]->file; + continue; + } + + if(files.last() != m_tracks[i]->file) + files.append(m_tracks[i]->file); + } + return files; +} + qint64 CUEParser::offset(int track) const { return m_tracks.at(track - 1)->offset; diff --git a/src/plugins/Input/cue/cueparser.h b/src/plugins/Input/cue/cueparser.h index 55c04c20a..797f3ae23 100644 --- a/src/plugins/Input/cue/cueparser.h +++ b/src/plugins/Input/cue/cueparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -40,6 +40,7 @@ public: QList<FileInfo*> createPlayList(); const QString filePath(int track) const; + const QStringList dataFiles() const; qint64 offset(int track) const; qint64 length(int track) const; int count() const; diff --git a/src/plugins/Input/cue/decodercuefactory.cpp b/src/plugins/Input/cue/decodercuefactory.cpp index 68ccc4fd4..a77190a2b 100644 --- a/src/plugins/Input/cue/decodercuefactory.cpp +++ b/src/plugins/Input/cue/decodercuefactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -60,7 +60,7 @@ Decoder *DecoderCUEFactory::create(const QString &path, QIODevice *input) return new DecoderCUE(path); } -QList<FileInfo *> DecoderCUEFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderCUEFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredPaths) { Q_UNUSED(useMetaData); CUEParser parser(fileName); @@ -76,7 +76,10 @@ QList<FileInfo *> DecoderCUEFactory::createPlayList(const QString &fileName, boo return QList<FileInfo *>() << info; } else + { + ignoredPaths->append(parser.dataFiles()); return parser.createPlayList(); + } } MetaDataModel* DecoderCUEFactory::createMetaDataModel(const QString &path, QObject *parent) diff --git a/src/plugins/Input/cue/decodercuefactory.h b/src/plugins/Input/cue/decodercuefactory.h index e5fadd935..0e146ccf5 100644 --- a/src/plugins/Input/cue/decodercuefactory.h +++ b/src/plugins/Input/cue/decodercuefactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -41,7 +41,7 @@ public: bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredPaths); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp index 397b9e6e4..296c48381 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -185,7 +185,7 @@ Decoder *DecoderFFmpegFactory::create(const QString &path, QIODevice *input) return new DecoderFFmpeg(path, input); } -QList<FileInfo *> DecoderFFmpegFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderFFmpegFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { QList <FileInfo*> list; AVFormatContext *in = 0; diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.h b/src/plugins/Input/ffmpeg/decoderffmpegfactory.h index 3848b98df..bca54e7e9 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.h +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2013 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -42,7 +42,7 @@ public: bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp index af7b00dcf..c2af6a06c 100644 --- a/src/plugins/Input/flac/decoderflacfactory.cpp +++ b/src/plugins/Input/flac/decoderflacfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -73,7 +73,7 @@ Decoder *DecoderFLACFactory::create(const QString &path, QIODevice *i) return new DecoderFLAC(path, i); } -QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredFiles) { QList <FileInfo*> list; TagLib::Ogg::XiphComment *tag = 0; @@ -89,7 +89,7 @@ QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName, bo path.remove("flac://"); path.remove(QRegExp("#\\d+$")); int track = fileName.section("#", -1).toInt(); - list = createPlayList(path, true); + list = createPlayList(path, true, ignoredFiles); if (list.isEmpty() || track <= 0 || track > list.count()) { qDeleteAll(list); diff --git a/src/plugins/Input/flac/decoderflacfactory.h b/src/plugins/Input/flac/decoderflacfactory.h index 39310edd2..addada2c7 100644 --- a/src/plugins/Input/flac/decoderflacfactory.h +++ b/src/plugins/Input/flac/decoderflacfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2008 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -33,14 +33,14 @@ class DecoderFLACFactory : public QObject, DecoderFactory { Q_OBJECT -Q_INTERFACES(DecoderFactory); +Q_INTERFACES(DecoderFactory) public: bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredFiles); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/gme/decodergmefactory.cpp b/src/plugins/Input/gme/decodergmefactory.cpp index 0858b35ec..e2ef81cdc 100644 --- a/src/plugins/Input/gme/decodergmefactory.cpp +++ b/src/plugins/Input/gme/decodergmefactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010-2013 by Ilya Kotov * + * Copyright (C) 2010-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -64,7 +64,7 @@ Decoder *DecoderGmeFactory::create(const QString &path, QIODevice *input) return new DecoderGme(path); } -QList<FileInfo *> DecoderGmeFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderGmeFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredFiles) { QList <FileInfo*> list; GmeHelper helper; @@ -75,7 +75,7 @@ QList<FileInfo *> DecoderGmeFactory::createPlayList(const QString &fileName, boo path.remove("gme://"); path.remove(QRegExp("#\\d+$")); int track = fileName.section("#", -1).toInt(); - list = createPlayList(path, true); + list = createPlayList(path, true, ignoredFiles); if (list.isEmpty() || track <= 0 || track > list.count()) { qDeleteAll(list); diff --git a/src/plugins/Input/gme/decodergmefactory.h b/src/plugins/Input/gme/decodergmefactory.h index a3612685d..ae5b4c8aa 100644 --- a/src/plugins/Input/gme/decodergmefactory.h +++ b/src/plugins/Input/gme/decodergmefactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -36,14 +36,14 @@ class DecoderGmeFactory : public QObject, DecoderFactory { Q_OBJECT - Q_INTERFACES(DecoderFactory); + Q_INTERFACES(DecoderFactory) public: bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredFiles); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index c1457c29f..265ced841 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -122,7 +122,7 @@ Decoder *DecoderMADFactory::create(const QString &url, QIODevice *input) return d; } -QList<FileInfo *> DecoderMADFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderMADFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { FileInfo *info = new FileInfo(fileName); TagLib::Tag *tag = 0; diff --git a/src/plugins/Input/mad/decodermadfactory.h b/src/plugins/Input/mad/decodermadfactory.h index 67fbad20a..70e827a28 100644 --- a/src/plugins/Input/mad/decodermadfactory.h +++ b/src/plugins/Input/mad/decodermadfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2014 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -42,7 +42,7 @@ public: bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/modplug/decodermodplugfactory.cpp b/src/plugins/Input/modplug/decodermodplugfactory.cpp index 45c25fb63..356afc08f 100644 --- a/src/plugins/Input/modplug/decodermodplugfactory.cpp +++ b/src/plugins/Input/modplug/decodermodplugfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -74,7 +74,7 @@ Decoder *DecoderModPlugFactory::create(const QString &path, QIODevice *input) return new DecoderModPlug(path); } -QList<FileInfo *> DecoderModPlugFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderModPlugFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { QList <FileInfo*> list; QSettings settings(Qmmp::configFile(), QSettings::IniFormat); diff --git a/src/plugins/Input/modplug/decodermodplugfactory.h b/src/plugins/Input/modplug/decodermodplugfactory.h index 94112daf3..be1bfe520 100644 --- a/src/plugins/Input/modplug/decodermodplugfactory.h +++ b/src/plugins/Input/modplug/decodermodplugfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -35,14 +35,14 @@ class DecoderModPlugFactory : public QObject, DecoderFactory { Q_OBJECT -Q_INTERFACES(DecoderFactory); +Q_INTERFACES(DecoderFactory) public: bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &, QIODevice *); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp index 30d06365b..cdbc4dcd4 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.cpp +++ b/src/plugins/Input/mpc/decodermpcfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -74,7 +74,7 @@ Decoder *DecoderMPCFactory::create(const QString &, QIODevice *i) return new DecoderMPC(i); } -QList<FileInfo *> DecoderMPCFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderMPCFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { FileInfo *info = new FileInfo(fileName); diff --git a/src/plugins/Input/mpc/decodermpcfactory.h b/src/plugins/Input/mpc/decodermpcfactory.h index 0212457f8..ffd968531 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.h +++ b/src/plugins/Input/mpc/decodermpcfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2008 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -37,14 +37,14 @@ class DecoderMPCFactory : public QObject, DecoderFactory { Q_OBJECT -Q_INTERFACES(DecoderFactory); +Q_INTERFACES(DecoderFactory) public: bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &url, QIODevice *i); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/opus/decoderopusfactory.cpp b/src/plugins/Input/opus/decoderopusfactory.cpp index 697e3a434..445d2a6df 100644 --- a/src/plugins/Input/opus/decoderopusfactory.cpp +++ b/src/plugins/Input/opus/decoderopusfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * + * Copyright (C) 2013-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -72,7 +72,7 @@ MetaDataModel* DecoderOpusFactory::createMetaDataModel(const QString &path, QObj return new OpusMetaDataModel(path, parent); } -QList<FileInfo *> DecoderOpusFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderOpusFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { FileInfo *info = new FileInfo(fileName); diff --git a/src/plugins/Input/opus/decoderopusfactory.h b/src/plugins/Input/opus/decoderopusfactory.h index 34bbd66d7..091a6d178 100644 --- a/src/plugins/Input/opus/decoderopusfactory.h +++ b/src/plugins/Input/opus/decoderopusfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * + * Copyright (C) 2013-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -44,7 +44,7 @@ public: const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); QObject* showDetails(QWidget *parent, const QString &path); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/sid/decodersidfactory.cpp b/src/plugins/Input/sid/decodersidfactory.cpp index e4b1d0b52..eda6768bd 100644 --- a/src/plugins/Input/sid/decodersidfactory.cpp +++ b/src/plugins/Input/sid/decodersidfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * + * Copyright (C) 2013-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -82,7 +82,7 @@ Decoder *DecoderSIDFactory::create(const QString &path, QIODevice *input) return new DecoderSID(&m_db, path); } -QList<FileInfo *> DecoderSIDFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderSIDFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { SIDHelper helper(&m_db); helper.load(fileName); @@ -133,4 +133,4 @@ QTranslator *DecoderSIDFactory::createTranslator(QObject *parent) translator->load(QString(":/sid_plugin_") + locale); return translator; } -Q_EXPORT_PLUGIN2(gme,DecoderSIDFactory) +Q_EXPORT_PLUGIN2(sid,DecoderSIDFactory) diff --git a/src/plugins/Input/sid/decodersidfactory.h b/src/plugins/Input/sid/decodersidfactory.h index d8bc4bc71..eec7b01db 100644 --- a/src/plugins/Input/sid/decodersidfactory.h +++ b/src/plugins/Input/sid/decodersidfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * + * Copyright (C) 2013-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,7 @@ public: bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp index d2e7c63db..5f3500ba1 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp +++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2012 by Ilya Kotov * + * Copyright (C) 2007-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -78,7 +78,7 @@ Decoder *DecoderSndFileFactory::create(const QString &path, QIODevice *) return new DecoderSndFile(path); } -QList<FileInfo *> DecoderSndFileFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderSndFileFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { QList <FileInfo *> list; SF_INFO snd_info; diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.h b/src/plugins/Input/sndfile/decodersndfilefactory.h index f4db9e8e0..e4a15d1fb 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.h +++ b/src/plugins/Input/sndfile/decodersndfilefactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2009 by Ilya Kotov * + * Copyright (C) 2007-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -34,14 +34,14 @@ class DecoderSndFileFactory : public QObject, DecoderFactory { Q_OBJECT -Q_INTERFACES(DecoderFactory); +Q_INTERFACES(DecoderFactory) public: bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/vorbis/decodervorbisfactory.cpp b/src/plugins/Input/vorbis/decodervorbisfactory.cpp index 342a543af..31fbdb94d 100644 --- a/src/plugins/Input/vorbis/decodervorbisfactory.cpp +++ b/src/plugins/Input/vorbis/decodervorbisfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2014 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -77,7 +77,7 @@ MetaDataModel* DecoderVorbisFactory::createMetaDataModel(const QString &path, QO return new VorbisMetaDataModel(path, parent); } -QList<FileInfo *> DecoderVorbisFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderVorbisFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { FileInfo *info = new FileInfo(fileName); diff --git a/src/plugins/Input/vorbis/decodervorbisfactory.h b/src/plugins/Input/vorbis/decodervorbisfactory.h index cbb07c8f6..bacdf0747 100644 --- a/src/plugins/Input/vorbis/decodervorbisfactory.h +++ b/src/plugins/Input/vorbis/decodervorbisfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2008 by Ilya Kotov * + * Copyright (C) 2006-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -46,7 +46,7 @@ public: const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); QObject* showDetails(QWidget *parent, const QString &path); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp index d668e0a97..0384a6613 100644 --- a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp +++ b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -29,8 +29,7 @@ bool DecoderWavPackFactory::supports(const QString &source) const { - - return (source.right(3).toLower() == ".wv"); + return source.endsWith(".wv", Qt::CaseInsensitive); } bool DecoderWavPackFactory::canDecode(QIODevice *input) const @@ -59,7 +58,7 @@ Decoder *DecoderWavPackFactory::create(const QString &p, QIODevice *) return new DecoderWavPack(p); } -QList<FileInfo *> DecoderWavPackFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderWavPackFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredFiles) { QList <FileInfo*> list; char err[80]; @@ -72,7 +71,7 @@ QList<FileInfo *> DecoderWavPackFactory::createPlayList(const QString &fileName, path.remove("wvpack://"); path.remove(QRegExp("#\\d+$")); int track = fileName.section("#", -1).toInt(); - list = createPlayList(path, true); + list = createPlayList(path, true, ignoredFiles); if (list.isEmpty() || track <= 0 || track > list.count()) { qDeleteAll(list); diff --git a/src/plugins/Input/wavpack/decoderwavpackfactory.h b/src/plugins/Input/wavpack/decoderwavpackfactory.h index 69c0f550e..571cb1568 100644 --- a/src/plugins/Input/wavpack/decoderwavpackfactory.h +++ b/src/plugins/Input/wavpack/decoderwavpackfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -35,14 +35,14 @@ class DecoderWavPackFactory : public QObject, DecoderFactory { Q_OBJECT - Q_INTERFACES(DecoderFactory); + Q_INTERFACES(DecoderFactory) public: bool supports(const QString &source) const; bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &p, QIODevice *i); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *ignoredFiles); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp index 5c9f4ad2d..7c31524b8 100644 --- a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp +++ b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -63,7 +63,7 @@ Decoder *DecoderWildMidiFactory::create(const QString &path, QIODevice *input) return new DecoderWildMidi(path); } -QList<FileInfo *> DecoderWildMidiFactory::createPlayList(const QString &fileName, bool useMetaData) +QList<FileInfo *> DecoderWildMidiFactory::createPlayList(const QString &fileName, bool useMetaData, QStringList *) { Q_UNUSED(useMetaData); QList <FileInfo*> list; diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.h b/src/plugins/Input/wildmidi/decoderwildmidifactory.h index 60d0d6f47..6a7e43f42 100644 --- a/src/plugins/Input/wildmidi/decoderwildmidifactory.h +++ b/src/plugins/Input/wildmidi/decoderwildmidifactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2013 by Ilya Kotov * + * Copyright (C) 2008-2015 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -40,7 +40,7 @@ public: bool canDecode(QIODevice *input) const; const DecoderProperties properties() const; Decoder *create(const QString &path, QIODevice *input); - QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData); + QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData, QStringList *); MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); |
