aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-05-09 17:46:39 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-05-09 17:46:39 +0000
commit4b9512abccfa313e723bbbc4a9a93ff29b0eedae (patch)
treeb33e0acbd62ac17630b690e8b1afc12afbb050fc
parent8f97d76080b9617fc67d01f2bc8de36a5b0a1175 (diff)
downloadqmmp-4b9512abccfa313e723bbbc4a9a93ff29b0eedae.tar.gz
qmmp-4b9512abccfa313e723bbbc4a9a93ff29b0eedae.tar.bz2
qmmp-4b9512abccfa313e723bbbc4a9a93ff29b0eedae.zip
cue: fixed regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8864 90c681e8-e032-0410-971d-27865f9a5e38
-rw-r--r--src/plugins/Input/cue/cuefile.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/plugins/Input/cue/cuefile.cpp b/src/plugins/Input/cue/cuefile.cpp
index d1c2301a9..2ba385aa4 100644
--- a/src/plugins/Input/cue/cuefile.cpp
+++ b/src/plugins/Input/cue/cuefile.cpp
@@ -83,7 +83,7 @@ CueFile::CueFile(const QString &path) : CueParser()
setUrl("cue", filePath);
for(const QString &dataFileName : files())
{
- QString dataFilePath = getDirtyPath(dataFileName, QFileInfo(filePath).dir().filePath(dataFileName));
+ QString dataFilePath = getDirtyPath(filePath, QFileInfo(filePath).dir().filePath(dataFileName));
m_dataFiles.insert(dataFileName, dataFilePath);
QList<TrackInfo *> pl = MetaDataManager::instance()->createPlayList(dataFilePath, TrackInfo::Properties);
if(!pl.isEmpty())
@@ -155,8 +155,8 @@ QStringList CueFile::splitLine(const QString &line)
}
QString CueFile::getDirtyPath(const QString &cue_path, const QString &path)
-{
- if((QFile::exists(path) && Decoder::findByFilePath(path)) || !m_dirty)
+{
+ if((QFile::exists(path) && Decoder::findByFilePath(path)))
return path;
QStringList candidates;
@@ -164,12 +164,17 @@ QString CueFile::getDirtyPath(const QString &cue_path, const QString &path)
while (it.hasNext())
{
it.next();
+
QString f = it.filePath();
- if ((f != cue_path) && Decoder::findByFilePath(f))
+
+ if(it.fileName().toLower() == QFileInfo(path).fileName().toLower() && Decoder::findByFilePath(f))
+ return it.filePath();
+
+ if(m_dirty && (f != cue_path) && Decoder::findByFilePath(f))
candidates.push_back(f);
}
- if (candidates.empty())
+ if (candidates.isEmpty())
return path;
else if (candidates.count() == 1)
return candidates.first();