Show a warning when the user tries to add a Cue Sheet like a normal file.
This commit is contained in:
parent
5cccd4de81
commit
db661fc50c
@ -1094,7 +1094,7 @@
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>CDA Files</source>
|
<source>CDDA Files</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -1109,6 +1109,18 @@
|
|||||||
<source>We recommend using %1 for that purpose.</source>
|
<source>We recommend using %1 for that purpose.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Files Rejected</source>
|
<source>Files Rejected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1390,10 +1390,6 @@
|
|||||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
<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>
|
<translation>In das ausgewählte Verzeichnis kann nicht geschrieben werden. Bitte ein anderes Verzeichnis auswählen!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>CDA Files</source>
|
|
||||||
<translation>CDA Dateien</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
<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>
|
<translation>%1 Datei(en) wurden abgewiesen, weil es sich um CDDA Platzhalter&minus;Dateien handelt!</translation>
|
||||||
@ -1570,6 +1566,22 @@
|
|||||||
<source>Cue Sheet File</source>
|
<source>Cue Sheet File</source>
|
||||||
<translation>Cuesheet Datei</translation>
|
<translation>Cuesheet Datei</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CDDA Files</source>
|
||||||
|
<translation>CDDA Dateien</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation>Cuesheet</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation>%1 Datei(en) wurden abgewiesen, weil es sich um Cuesheet Image&minus;Dateien handelt!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation>Bitte benutzen Sie zum Importieren von Cuesheets den LameXP Cuesheet Assistenten.</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<name>MetaInfo</name>
|
||||||
|
@ -1389,10 +1389,6 @@
|
|||||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||||
<translation>¡No se puede escribir en la carpeta seleccionada. Por favor, seleccione otra!</translation>
|
<translation>¡No se puede escribir en la carpeta seleccionada. Por favor, seleccione otra!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>CDA Files</source>
|
|
||||||
<translation>Archivos CDA</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||||
<translation>¡%1 archivo(s) rechazado(s), ya que son archivos CDDA vacíos!</translation>
|
<translation>¡%1 archivo(s) rechazado(s), ya que son archivos CDDA vacíos!</translation>
|
||||||
@ -1569,6 +1565,22 @@
|
|||||||
<source>Cue Sheet File</source>
|
<source>Cue Sheet File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CDDA Files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<name>MetaInfo</name>
|
||||||
|
@ -1398,10 +1398,6 @@ Sélection automatique (par défaut)</translation>
|
|||||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||||
<translation>Impossible d'écrire dans le répertoire sélectionné. Veuillez choisir un autre répertoire !</translation>
|
<translation>Impossible d'écrire dans le répertoire sélectionné. Veuillez choisir un autre répertoire !</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>CDA Files</source>
|
|
||||||
<translation>Fichiers CDA</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||||
<translation>%1 fichiers ont été rejetés parce qu'ils sont des fichiers CDDA fictifs !</translation>
|
<translation>%1 fichiers ont été rejetés parce qu'ils sont des fichiers CDDA fictifs !</translation>
|
||||||
@ -1579,6 +1575,22 @@ Ouvrir le dossier récursivement...</translation>
|
|||||||
<source>Cue Sheet File</source>
|
<source>Cue Sheet File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CDDA Files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<name>MetaInfo</name>
|
||||||
|
@ -1390,10 +1390,6 @@
|
|||||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>CDA Files</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -1570,6 +1566,22 @@
|
|||||||
<source>Cue Sheet File</source>
|
<source>Cue Sheet File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CDDA Files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<name>MetaInfo</name>
|
||||||
|
@ -993,10 +993,6 @@
|
|||||||
<source>This usually means the file is locked by another process.</source>
|
<source>This usually means the file is locked by another process.</source>
|
||||||
<translation type="unfinished">다른 프로세스에 의해 파일이 잠겨 있는 경우입니다.</translation>
|
<translation type="unfinished">다른 프로세스에 의해 파일이 잠겨 있는 경우입니다.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>CDA Files</source>
|
|
||||||
<translation type="unfinished">CDA 파일</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||||
<translation type="unfinished">%1 파일이 거부되었습니다. 가짜 CDDA 파일입니다!</translation>
|
<translation type="unfinished">%1 파일이 거부되었습니다. 가짜 CDDA 파일입니다!</translation>
|
||||||
@ -1569,6 +1565,22 @@
|
|||||||
<source>Cue Sheet File</source>
|
<source>Cue Sheet File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CDDA Files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<name>MetaInfo</name>
|
||||||
|
@ -1403,10 +1403,6 @@
|
|||||||
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
<source>Cannot write to the selected directory. Please choose another directory!</source>
|
||||||
<translation type="unfinished">Директория недоступна для записи. Пожалуйса, выберите другую директорию!</translation>
|
<translation type="unfinished">Директория недоступна для записи. Пожалуйса, выберите другую директорию!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>CDA Files</source>
|
|
||||||
<translation type="unfinished">Файлы CDA</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||||
<translation type="unfinished">%1 файла(ов) было отменено, изза пустых CDDA файлов!</translation>
|
<translation type="unfinished">%1 файла(ов) было отменено, изза пустых CDDA файлов!</translation>
|
||||||
@ -1571,6 +1567,22 @@
|
|||||||
<source>Cue Sheet File</source>
|
<source>Cue Sheet File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CDDA Files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<name>MetaInfo</name>
|
||||||
|
@ -1389,10 +1389,6 @@
|
|||||||
<source>Open Folder Recursively...</source>
|
<source>Open Folder Recursively...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>CDA Files</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
<source>%1 file(s) have been rejected, because they are dummy CDDA files!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -1569,6 +1565,22 @@
|
|||||||
<source>Cue Sheet File</source>
|
<source>Cue Sheet File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>CDDA Files</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cue Sheet</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>%1 file(s) have been rejected, because they appear to be Cue Sheet images!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MetaInfo</name>
|
<name>MetaInfo</name>
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -30,7 +30,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 2
|
#define VER_LAMEXP_MINOR_LO 2
|
||||||
#define VER_LAMEXP_TYPE Beta
|
#define VER_LAMEXP_TYPE Beta
|
||||||
#define VER_LAMEXP_PATCH 1
|
#define VER_LAMEXP_PATCH 1
|
||||||
#define VER_LAMEXP_BUILD 529
|
#define VER_LAMEXP_BUILD 530
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Tools versions
|
// Tools versions
|
||||||
|
@ -467,7 +467,11 @@ void MainWindow::addFiles(const QStringList &files)
|
|||||||
}
|
}
|
||||||
if(analyzer->filesDummyCDDA())
|
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>")));
|
QMessageBox::warning(this, tr("CDDA 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->filesCueSheet())
|
||||||
|
{
|
||||||
|
QMessageBox::warning(this, tr("Cue Sheet"), QString("<nobr>%1<br>%2</nobr>").arg(tr("%1 file(s) have been rejected, because they appear to be Cue Sheet images!").arg(analyzer->filesCueSheet()), tr("Please use LameXP's Cue Sheet wizard for importing Cue Sheet files.")));
|
||||||
}
|
}
|
||||||
if(analyzer->filesRejected())
|
if(analyzer->filesRejected())
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,7 @@ FileAnalyzer::FileAnalyzer(const QStringList &inputFiles)
|
|||||||
m_filesRejected = 0;
|
m_filesRejected = 0;
|
||||||
m_filesDenied = 0;
|
m_filesDenied = 0;
|
||||||
m_filesDummyCDDA = 0;
|
m_filesDummyCDDA = 0;
|
||||||
|
m_filesCueSheet = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
@ -72,16 +73,19 @@ void FileAnalyzer::run()
|
|||||||
m_filesRejected = 0;
|
m_filesRejected = 0;
|
||||||
m_filesDenied = 0;
|
m_filesDenied = 0;
|
||||||
m_filesDummyCDDA = 0;
|
m_filesDummyCDDA = 0;
|
||||||
|
m_filesCueSheet = 0;
|
||||||
|
|
||||||
m_inputFiles.sort();
|
m_inputFiles.sort();
|
||||||
|
|
||||||
m_abortFlag = false;
|
m_abortFlag = false;
|
||||||
|
|
||||||
while(!m_inputFiles.isEmpty())
|
while(!m_inputFiles.isEmpty())
|
||||||
{
|
{
|
||||||
|
int fileType = fileTypeNormal;
|
||||||
QString currentFile = QDir::fromNativeSeparators(m_inputFiles.takeFirst());
|
QString currentFile = QDir::fromNativeSeparators(m_inputFiles.takeFirst());
|
||||||
qDebug64("Analyzing: %1", currentFile);
|
qDebug64("Analyzing: %1", currentFile);
|
||||||
emit fileSelected(QFileInfo(currentFile).fileName());
|
emit fileSelected(QFileInfo(currentFile).fileName());
|
||||||
AudioFileModel file = analyzeFile(currentFile);
|
AudioFileModel file = analyzeFile(currentFile, &fileType);
|
||||||
|
|
||||||
if(m_abortFlag)
|
if(m_abortFlag)
|
||||||
{
|
{
|
||||||
@ -91,12 +95,34 @@ void FileAnalyzer::run()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(fileType == fileTypeDenied)
|
||||||
|
{
|
||||||
|
m_filesDenied++;
|
||||||
|
qWarning("Cannot access file for reading, skipping!");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(fileType == fileTypeCDDA)
|
||||||
|
{
|
||||||
|
m_filesDummyCDDA++;
|
||||||
|
qWarning("Dummy CDDA file detected, skipping!");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(file.fileName().isEmpty() || file.formatContainerType().isEmpty() || file.formatAudioType().isEmpty())
|
if(file.fileName().isEmpty() || file.formatContainerType().isEmpty() || file.formatAudioType().isEmpty())
|
||||||
{
|
{
|
||||||
if(!PlaylistImporter::importPlaylist(m_inputFiles, currentFile))
|
if(PlaylistImporter::importPlaylist(m_inputFiles, currentFile))
|
||||||
{
|
{
|
||||||
|
qDebug("Imported playlist file.");
|
||||||
|
}
|
||||||
|
else if(!QFileInfo(currentFile).suffix().compare("cue", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
qWarning("Cue Sheet file detected, skipping!");
|
||||||
|
m_filesCueSheet++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qDebug64("Rejected file of unknown type: %1", file.filePath());
|
||||||
m_filesRejected++;
|
m_filesRejected++;
|
||||||
qDebug64("Skipped: %1", file.filePath());
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -113,8 +139,10 @@ void FileAnalyzer::run()
|
|||||||
// Privtae Functions
|
// Privtae Functions
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const AudioFileModel FileAnalyzer::analyzeFile(const QString &filePath)
|
const AudioFileModel FileAnalyzer::analyzeFile(const QString &filePath, int *type)
|
||||||
{
|
{
|
||||||
|
*type = fileTypeNormal;
|
||||||
|
|
||||||
AudioFileModel audioFile(filePath);
|
AudioFileModel audioFile(filePath);
|
||||||
m_currentSection = sectionOther;
|
m_currentSection = sectionOther;
|
||||||
m_currentCover = coverNone;
|
m_currentCover = coverNone;
|
||||||
@ -122,15 +150,13 @@ const AudioFileModel FileAnalyzer::analyzeFile(const QString &filePath)
|
|||||||
QFile readTest(filePath);
|
QFile readTest(filePath);
|
||||||
if(!readTest.open(QIODevice::ReadOnly))
|
if(!readTest.open(QIODevice::ReadOnly))
|
||||||
{
|
{
|
||||||
qWarning("Cannot access file for reading, skipping!");
|
*type = fileTypeDenied;
|
||||||
m_filesDenied++;
|
|
||||||
return audioFile;
|
return audioFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(checkFile_CDDA(readTest))
|
if(checkFile_CDDA(readTest))
|
||||||
{
|
{
|
||||||
qWarning("Dummy CDDA file detected, skipping!");
|
*type = fileTypeCDDA;
|
||||||
m_filesDummyCDDA ++;
|
|
||||||
return audioFile;
|
return audioFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,7 +546,7 @@ unsigned int FileAnalyzer::filesAccepted(void)
|
|||||||
|
|
||||||
unsigned int FileAnalyzer::filesRejected(void)
|
unsigned int FileAnalyzer::filesRejected(void)
|
||||||
{
|
{
|
||||||
return max(m_filesRejected - (m_filesDenied + m_filesDummyCDDA), 0);
|
return m_filesRejected;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int FileAnalyzer::filesDenied(void)
|
unsigned int FileAnalyzer::filesDenied(void)
|
||||||
@ -533,6 +559,11 @@ unsigned int FileAnalyzer::filesDummyCDDA(void)
|
|||||||
return m_filesDummyCDDA;
|
return m_filesDummyCDDA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int FileAnalyzer::filesCueSheet(void)
|
||||||
|
{
|
||||||
|
return m_filesCueSheet;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// EVENTS
|
// EVENTS
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -47,6 +47,7 @@ public:
|
|||||||
unsigned int filesRejected(void);
|
unsigned int filesRejected(void);
|
||||||
unsigned int filesDenied(void);
|
unsigned int filesDenied(void);
|
||||||
unsigned int filesDummyCDDA(void);
|
unsigned int filesDummyCDDA(void);
|
||||||
|
unsigned int filesCueSheet(void);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void fileSelected(const QString &fileName);
|
void fileSelected(const QString &fileName);
|
||||||
@ -69,8 +70,14 @@ private:
|
|||||||
coverPng,
|
coverPng,
|
||||||
coverGif
|
coverGif
|
||||||
};
|
};
|
||||||
|
enum fileType_t
|
||||||
|
{
|
||||||
|
fileTypeNormal = 0,
|
||||||
|
fileTypeCDDA = 1,
|
||||||
|
fileTypeDenied = 2
|
||||||
|
};
|
||||||
|
|
||||||
const AudioFileModel analyzeFile(const QString &filePath);
|
const AudioFileModel analyzeFile(const QString &filePath, int *type);
|
||||||
void updateInfo(AudioFileModel &audioFile, const QString &key, const QString &value);
|
void updateInfo(AudioFileModel &audioFile, const QString &key, const QString &value);
|
||||||
void updateSection(const QString §ion);
|
void updateSection(const QString §ion);
|
||||||
unsigned int parseYear(const QString &str);
|
unsigned int parseYear(const QString &str);
|
||||||
@ -86,6 +93,8 @@ private:
|
|||||||
unsigned int m_filesRejected;
|
unsigned int m_filesRejected;
|
||||||
unsigned int m_filesDenied;
|
unsigned int m_filesDenied;
|
||||||
unsigned int m_filesDummyCDDA;
|
unsigned int m_filesDummyCDDA;
|
||||||
|
unsigned int m_filesCueSheet;
|
||||||
|
|
||||||
|
|
||||||
volatile bool m_abortFlag;
|
volatile bool m_abortFlag;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user