Detect the .cda files that can be found in the root of the "dummy" file systems that Windows emulates for Audio-CD's. If such files are encountered, we tell the user gently to rip the audio tracks with EAC.
This commit is contained in:
parent
f60515ca50
commit
cf45f0391f
@ -773,6 +773,22 @@
|
||||
<source>This usually means the file is locked by another process.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CDA Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We recommend using %1 for that purpose.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Files Rejected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1194,6 +1194,22 @@
|
||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||
<translation>In das ausgewählte Verzeichnis kann nicht geschrieben werden. Bitte ein anderes Verzeichnis auswählen!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CDA Files</source>
|
||||
<translation>CDA Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation>%1 Datei(en) wurden abgewiesen, weil es sich um CDDA Platzhalter&minus;Dateien handelt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present.</source>
|
||||
<translation>LameXP ist derzeit leider nicht dazu in der Lage, Audio Tracks von einer Audio&minus;CD zu extrahieren.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We recommend using %1 for that purpose.</source>
|
||||
<translation>Es wird empfohlen %1 für diesen Zweck zu verwenden.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MetaInfo</name>
|
||||
|
@ -1193,6 +1193,22 @@
|
||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CDA Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We recommend using %1 for that purpose.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MetaInfo</name>
|
||||
|
@ -1202,6 +1202,22 @@ Sélection automatique (par défaut)</translation>
|
||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CDA Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We recommend using %1 for that purpose.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MetaInfo</name>
|
||||
|
@ -1194,6 +1194,22 @@
|
||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CDA Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We recommend using %1 for that purpose.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MetaInfo</name>
|
||||
|
@ -1196,6 +1196,22 @@
|
||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CDA Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We recommend using %1 for that purpose.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MetaInfo</name>
|
||||
|
@ -1193,6 +1193,22 @@
|
||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CDA Files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>We recommend using %1 for that purpose.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, LameXP cannot extract audio tracks from an Audio&minus;CD at present.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MetaInfo</name>
|
||||
|
Binary file not shown.
@ -25,7 +25,7 @@
|
||||
#define VER_LAMEXP_MAJOR 4
|
||||
#define VER_LAMEXP_MINOR_HI 0
|
||||
#define VER_LAMEXP_MINOR_LO 1
|
||||
#define VER_LAMEXP_BUILD 373
|
||||
#define VER_LAMEXP_BUILD 375
|
||||
#define VER_LAMEXP_SUFFIX Beta-9
|
||||
|
||||
/*
|
||||
|
@ -436,6 +436,10 @@ void MainWindow::addFiles(const QStringList &files)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Access Denied"), QString("<nobr>%1<br>%2</nobr>").arg(tr("%1 file(s) have been rejected, because read access was not granted!").arg(analyzer->filesDenied()), tr("This usually means the file is locked by another process.")));
|
||||
}
|
||||
if(analyzer->filesDummyCDDA())
|
||||
{
|
||||
QMessageBox::warning(this, tr("CDA Files"), QString("<nobr>%1<br><br>%2<br>%3</nobr>").arg(tr("%1 file(s) have been rejected, because they are dummy CDDA files!").arg(analyzer->filesDummyCDDA()), tr("Sorry, LameXP cannot extract audio tracks from an Audio−CD at present."), tr("We recommend using %1 for that purpose.").arg("<a href=\"http://www.exactaudiocopy.de/\">Exact Audio Copy</a>")));
|
||||
}
|
||||
if(analyzer->filesRejected())
|
||||
{
|
||||
QMessageBox::warning(this, tr("Files Rejected"), QString("<nobr>%1<br>%2</nobr>").arg(tr("%1 file(s) have been rejected, because the file format could not be recognized!").arg(analyzer->filesRejected()), tr("This usually means the file is damaged or the file format is not supported.")));
|
||||
|
@ -55,6 +55,7 @@ FileAnalyzer::FileAnalyzer(const QStringList &inputFiles)
|
||||
m_filesAccepted = 0;
|
||||
m_filesRejected = 0;
|
||||
m_filesDenied = 0;
|
||||
m_filesDummyCDDA = 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@ -68,6 +69,7 @@ void FileAnalyzer::run()
|
||||
m_filesAccepted = 0;
|
||||
m_filesRejected = 0;
|
||||
m_filesDenied = 0;
|
||||
m_filesDummyCDDA = 0;
|
||||
|
||||
m_inputFiles.sort();
|
||||
|
||||
@ -113,10 +115,15 @@ const AudioFileModel FileAnalyzer::analyzeFile(const QString &filePath)
|
||||
m_filesDenied++;
|
||||
return audioFile;
|
||||
}
|
||||
else
|
||||
|
||||
if(checkFile_CDDA(readTest))
|
||||
{
|
||||
readTest.close();
|
||||
qWarning("Dummy CDDA file detected, skipping!");
|
||||
m_filesDummyCDDA ++;
|
||||
return audioFile;
|
||||
}
|
||||
|
||||
readTest.close();
|
||||
|
||||
QProcess process;
|
||||
process.setProcessChannelMode(QProcess::MergedChannels);
|
||||
@ -359,6 +366,18 @@ unsigned int FileAnalyzer::parseDuration(const QString &str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool FileAnalyzer::checkFile_CDDA(QFile &file)
|
||||
{
|
||||
file.reset();
|
||||
QByteArray data = file.read(128);
|
||||
|
||||
int i = data.indexOf("RIFF");
|
||||
int j = data.indexOf("CDDA");
|
||||
int k = data.indexOf("fmt ");
|
||||
|
||||
return ((i >= 0) && (j >= 0) && (k >= 0) && (k > j) && (j > i));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Public Functions
|
||||
////////////////////////////////////////////////////////////
|
||||
@ -370,7 +389,7 @@ unsigned int FileAnalyzer::filesAccepted(void)
|
||||
|
||||
unsigned int FileAnalyzer::filesRejected(void)
|
||||
{
|
||||
return m_filesRejected - m_filesDenied;
|
||||
return max(m_filesRejected - (m_filesDenied + m_filesDummyCDDA), 0);
|
||||
}
|
||||
|
||||
unsigned int FileAnalyzer::filesDenied(void)
|
||||
@ -378,6 +397,11 @@ unsigned int FileAnalyzer::filesDenied(void)
|
||||
return m_filesDenied;
|
||||
}
|
||||
|
||||
unsigned int FileAnalyzer::filesDummyCDDA(void)
|
||||
{
|
||||
return m_filesDummyCDDA;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// EVENTS
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -46,6 +46,7 @@ public:
|
||||
unsigned int filesAccepted(void);
|
||||
unsigned int filesRejected(void);
|
||||
unsigned int filesDenied(void);
|
||||
unsigned int filesDummyCDDA(void);
|
||||
|
||||
signals:
|
||||
void fileSelected(const QString &fileName);
|
||||
@ -64,6 +65,7 @@ private:
|
||||
void updateSection(const QString §ion);
|
||||
unsigned int parseYear(const QString &str);
|
||||
unsigned int parseDuration(const QString &str);
|
||||
bool checkFile_CDDA(QFile &file);
|
||||
|
||||
QStringList m_inputFiles;
|
||||
const QString m_mediaInfoBin_x86;
|
||||
@ -72,5 +74,6 @@ private:
|
||||
unsigned int m_filesAccepted;
|
||||
unsigned int m_filesRejected;
|
||||
unsigned int m_filesDenied;
|
||||
unsigned int m_filesDummyCDDA;
|
||||
bool m_bSuccess;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user