Support more CUE filenames

Fixes #835
This commit is contained in:
Jonas Kvinge
2021-11-27 20:28:00 +01:00
parent a97dbab2ae
commit 8f49d1591f
5 changed files with 41 additions and 19 deletions

View File

@@ -379,3 +379,16 @@ bool CueParser::TryMagic(const QByteArray &data) const {
return false;
}
QString CueParser::FindCueFilename(const QString &filename) {
QStringList cue_files = QStringList() << filename + ".cue"
<< filename.section('.', 0, -2) + ".cue";
for (const QString &cuefile : cue_files) {
if (QFileInfo::exists(cuefile)) return cuefile;
}
return QString();
}