aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/wavpack
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Input/wavpack')
-rw-r--r--src/plugins/Input/wavpack/cueparser.cpp49
-rw-r--r--src/plugins/Input/wavpack/cueparser.h4
2 files changed, 2 insertions, 51 deletions
diff --git a/src/plugins/Input/wavpack/cueparser.cpp b/src/plugins/Input/wavpack/cueparser.cpp
index 0554370c6..4d8cb8491 100644
--- a/src/plugins/Input/wavpack/cueparser.cpp
+++ b/src/plugins/Input/wavpack/cueparser.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2012 by Ilya Kotov *
+ * Copyright (C) 2008-2016 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -212,50 +212,3 @@ qint64 CUEParser::getLength(const QString &str)
return (qint64)list.at(0).toInt()*60000 + list.at(1).toInt()*1000 + list.at(2).toInt()*1000/75;
return 0;
}
-
-QString CUEParser::getDirtyPath(const QString &cue, const QString &path)
-{
-
- if (Decoder::findByFilePath(path) || ! m_dirty)
- return path;
-
- QStringList candidates;
- QDirIterator it(QFileInfo(path).dir().path(), QDir::Files);
- while (it.hasNext())
- {
- it.next();
- QString f = it.filePath();
- if ((f != cue) && Decoder::findByFilePath(f))
- candidates.push_back(f);
- }
-
- if (candidates.empty())
- return path;
- else if (candidates.count() == 1)
- return candidates.first();
-
- int dot = cue.lastIndexOf('.');
- if (dot != -1)
- {
- QRegExp r(QRegExp::escape(cue.left(dot)) + "\\.[^\\.]+$");
-
- int index = candidates.indexOf(r);
- int rindex = candidates.lastIndexOf(r);
-
- if ((index != -1) && (index == rindex))
- return candidates[index];
- }
- dot = path.lastIndexOf('.');
- if (dot != -1)
- {
- QRegExp r(QRegExp::escape(path.left(dot)) + "\\.[^\\.]+$");
-
- int index = candidates.indexOf(r);
- int rindex = candidates.lastIndexOf(r);
-
- if ((index != -1) && (index == rindex))
- return candidates[index];
- }
-
- return path;
-}
diff --git a/src/plugins/Input/wavpack/cueparser.h b/src/plugins/Input/wavpack/cueparser.h
index fc72c9084..a7926170f 100644
--- a/src/plugins/Input/wavpack/cueparser.h
+++ b/src/plugins/Input/wavpack/cueparser.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2012 by Ilya Kotov *
+ * Copyright (C) 2008-2016 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -56,10 +56,8 @@ private:
QMap<Qmmp::ReplayGainKey, double> replayGain;
};
QList <CUETrack * > m_tracks;
- bool m_dirty;
QStringList splitLine(const QString &line);
qint64 getLength(const QString &str);
- QString getDirtyPath(const QString &cue, const QString &path);
QString m_filePath;
};