Adapted for latest MUtils changes in clean_file_name() function. The "pretty" parameter is now used/required.
This commit is contained in:
parent
9a8d511c12
commit
68806eefb1
File diff suppressed because one or more lines are too long
@ -8,6 +8,7 @@ LameXP Audio-Encoder Front-End – Changelog
|
|||||||
## LameXP v4.15 [2017-??-??] ## {-}
|
## LameXP v4.15 [2017-??-??] ## {-}
|
||||||
* Fixed a bug in auto-rename feature, that caused problems when a meta-tag contained path separators
|
* Fixed a bug in auto-rename feature, that caused problems when a meta-tag contained path separators
|
||||||
* Fixed included MediaInfo binary not working on processor *without* SSE2 support
|
* Fixed included MediaInfo binary not working on processor *without* SSE2 support
|
||||||
|
* Improved file name generation from meta-tags containing characters that are forbidden in file names
|
||||||
* Some improvements for "high DPI" screens: Adjust initial window size according to DPI setting
|
* Some improvements for "high DPI" screens: Adjust initial window size according to DPI setting
|
||||||
* Updated Opus encoder/decoder libraries to v1.2-alpha2 (2017-03-03) and Opus-Tools to v0.1.10 (2017-02-22)
|
* Updated Opus encoder/decoder libraries to v1.2-alpha2 (2017-03-03) and Opus-Tools to v0.1.10 (2017-02-22)
|
||||||
* Updated MediaInfo to v0.7.93 (2017-02-28), compiled with ICL 17.0 and MSVC 12.0
|
* Updated MediaInfo to v0.7.93 (2017-02-28), compiled with ICL 17.0 and MSVC 12.0
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 5
|
#define VER_LAMEXP_MINOR_LO 5
|
||||||
#define VER_LAMEXP_TYPE Beta
|
#define VER_LAMEXP_TYPE Beta
|
||||||
#define VER_LAMEXP_PATCH 3
|
#define VER_LAMEXP_PATCH 3
|
||||||
#define VER_LAMEXP_BUILD 1970
|
#define VER_LAMEXP_BUILD 1973
|
||||||
#define VER_LAMEXP_CONFG 1934
|
#define VER_LAMEXP_CONFG 1934
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -3012,7 +3012,7 @@ void MainWindow::makeFolderButtonClicked(void)
|
|||||||
{
|
{
|
||||||
ABORT_IF_BUSY;
|
ABORT_IF_BUSY;
|
||||||
|
|
||||||
if(!m_fileSystemModel)
|
if(m_fileSystemModel.isNull())
|
||||||
{
|
{
|
||||||
qWarning("File system model not initialized yet!");
|
qWarning("File system model not initialized yet!");
|
||||||
return;
|
return;
|
||||||
@ -3031,7 +3031,7 @@ void MainWindow::makeFolderButtonClicked(void)
|
|||||||
}
|
}
|
||||||
else if(!m_metaData->album().isEmpty())
|
else if(!m_metaData->album().isEmpty())
|
||||||
{
|
{
|
||||||
suggestedName =m_metaData->album();
|
suggestedName = m_metaData->album();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3059,7 +3059,7 @@ void MainWindow::makeFolderButtonClicked(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suggestedName = MUtils::clean_file_name(suggestedName);
|
suggestedName = MUtils::clean_file_name(suggestedName, true);
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
@ -3068,7 +3068,7 @@ void MainWindow::makeFolderButtonClicked(void)
|
|||||||
|
|
||||||
if(bApplied)
|
if(bApplied)
|
||||||
{
|
{
|
||||||
folderName = MUtils::clean_file_path(folderName.simplified());
|
folderName = MUtils::clean_file_path(folderName.simplified(), true);
|
||||||
|
|
||||||
if(folderName.isEmpty())
|
if(folderName.isEmpty())
|
||||||
{
|
{
|
||||||
@ -4039,7 +4039,7 @@ void MainWindow::renameOutputPatternChanged(const QString &text, const bool &sil
|
|||||||
pattern.replace("<Year>", "2001", Qt::CaseInsensitive);
|
pattern.replace("<Year>", "2001", Qt::CaseInsensitive);
|
||||||
pattern.replace("<Comment>", "Encoded by LameXP", Qt::CaseInsensitive);
|
pattern.replace("<Comment>", "Encoded by LameXP", Qt::CaseInsensitive);
|
||||||
|
|
||||||
const QString patternClean = MUtils::clean_file_name(pattern);
|
const QString patternClean = MUtils::clean_file_name(pattern, false);
|
||||||
|
|
||||||
if(pattern.compare(patternClean))
|
if(pattern.compare(patternClean))
|
||||||
{
|
{
|
||||||
@ -4131,7 +4131,7 @@ void MainWindow::renameRegExpReplaceChanged(const QString &text, const bool &si
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(replacement.compare(MUtils::clean_file_name(replacement)))
|
if(replacement.compare(MUtils::clean_file_name(replacement, false)))
|
||||||
{
|
{
|
||||||
if(ui->lineEditRenameRegExp_Replace->palette().color(QPalette::Text) != Qt::red)
|
if(ui->lineEditRenameRegExp_Replace->palette().color(QPalette::Text) != Qt::red)
|
||||||
{
|
{
|
||||||
|
@ -985,7 +985,7 @@ void ProcessingDialog::writePlayList(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Clean playlist name
|
//Clean playlist name
|
||||||
playListName = MUtils::clean_file_name(playListName);
|
playListName = MUtils::clean_file_name(playListName, true);
|
||||||
|
|
||||||
//Create list of audio files
|
//Create list of audio files
|
||||||
for(int i = 0; i < m_allJobs.count(); i++)
|
for(int i = 0; i < m_allJobs.count(); i++)
|
||||||
|
@ -208,10 +208,10 @@ void CueSplitter::run()
|
|||||||
|
|
||||||
//Generate output file name
|
//Generate output file name
|
||||||
QString trackTitle = trackMetaInfo.title().isEmpty() ? QString().sprintf("Track %02d", trackNo) : trackMetaInfo.title();
|
QString trackTitle = trackMetaInfo.title().isEmpty() ? QString().sprintf("Track %02d", trackNo) : trackMetaInfo.title();
|
||||||
QString outputFile = QString("%1/[%2] %3 - %4.wav").arg(m_outputDir, QString().sprintf("%02d", trackNo), MUtils::clean_file_name(m_baseName), MUtils::clean_file_name(trackTitle));
|
QString outputFile = QString("%1/[%2] %3 - %4.wav").arg(m_outputDir, QString().sprintf("%02d", trackNo), MUtils::clean_file_name(m_baseName, true), MUtils::clean_file_name(trackTitle, true));
|
||||||
for(int n = 2; QFileInfo(outputFile).exists(); n++)
|
for(int n = 2; QFileInfo(outputFile).exists(); n++)
|
||||||
{
|
{
|
||||||
outputFile = QString("%1/[%2] %3 - %4 (%5).wav").arg(m_outputDir, QString().sprintf("%02d", trackNo), MUtils::clean_file_name(m_baseName), MUtils::clean_file_name(trackTitle), QString::number(n));
|
outputFile = QString("%1/[%2] %3 - %4 (%5).wav").arg(m_outputDir, QString().sprintf("%02d", trackNo), MUtils::clean_file_name(m_baseName, true), MUtils::clean_file_name(trackTitle, true), QString::number(n));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Call split function
|
//Call split function
|
||||||
|
@ -420,7 +420,7 @@ int ProcessThread::generateOutFileName(QString &outFileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QString baseName = sourceFile.completeBaseName();
|
const QString baseName = sourceFile.completeBaseName();
|
||||||
QDir targetDir(MUtils::clean_file_path(m_outputDirectory.isEmpty() ? sourceFile.canonicalPath() : m_outputDirectory));
|
QDir targetDir(MUtils::clean_file_path(m_outputDirectory.isEmpty() ? sourceFile.canonicalPath() : m_outputDirectory, false));
|
||||||
|
|
||||||
//Prepend relative source file path?
|
//Prepend relative source file path?
|
||||||
if(m_prependRelativeSourcePath && !m_outputDirectory.isEmpty())
|
if(m_prependRelativeSourcePath && !m_outputDirectory.isEmpty())
|
||||||
@ -434,7 +434,7 @@ int ProcessThread::generateOutFileName(QString &outFileName)
|
|||||||
if (!sourceDir.cdUp()) break;
|
if (!sourceDir.cdUp()) break;
|
||||||
}
|
}
|
||||||
const QString postfix = QFileInfo(sourceDir.relativeFilePath(sourceFile.canonicalFilePath())).path();
|
const QString postfix = QFileInfo(sourceDir.relativeFilePath(sourceFile.canonicalFilePath())).path();
|
||||||
targetDir.setPath(MUtils::clean_file_path(QString("%1/%2").arg(targetDir.absolutePath(), postfix)));
|
targetDir.setPath(MUtils::clean_file_path(QString("%1/%2").arg(targetDir.absolutePath(), postfix), false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,7 +462,7 @@ int ProcessThread::generateOutFileName(QString &outFileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Apply rename pattern
|
//Apply rename pattern
|
||||||
const QString fileName = MUtils::clean_file_name(applyRegularExpression(applyRenamePattern(baseName, m_audioFile.metaInfo())));
|
const QString fileName = MUtils::clean_file_name(applyRegularExpression(applyRenamePattern(baseName, m_audioFile.metaInfo())), true);
|
||||||
|
|
||||||
//Generate full output path
|
//Generate full output path
|
||||||
const QString fileExt = m_renameFileExt.isEmpty() ? QString::fromUtf8(m_encoder->toEncoderInfo()->extension()) : m_renameFileExt;
|
const QString fileExt = m_renameFileExt.isEmpty() ? QString::fromUtf8(m_encoder->toEncoderInfo()->extension()) : m_renameFileExt;
|
||||||
@ -742,7 +742,7 @@ void ProcessThread::setRenameRegExp(const QString &search, const QString &replac
|
|||||||
|
|
||||||
void ProcessThread::setRenameFileExt(const QString &fileExtension)
|
void ProcessThread::setRenameFileExt(const QString &fileExtension)
|
||||||
{
|
{
|
||||||
m_renameFileExt = MUtils::clean_file_name(fileExtension).simplified();
|
m_renameFileExt = MUtils::clean_file_name(fileExtension, false).simplified();
|
||||||
while(m_renameFileExt.startsWith('.'))
|
while(m_renameFileExt.startsWith('.'))
|
||||||
{
|
{
|
||||||
m_renameFileExt = m_renameFileExt.mid(1).trimmed();
|
m_renameFileExt = m_renameFileExt.mid(1).trimmed();
|
||||||
|
Loading…
Reference in New Issue
Block a user