diff --git a/LameXP.vcproj b/LameXP.vcproj index 50fb9d0d..700feff4 100644 --- a/LameXP.vcproj +++ b/LameXP.vcproj @@ -1105,6 +1105,36 @@ + + + + + + + + + + + diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index 7e4e6362..57505238 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -135,6 +135,37 @@ About Third-party Software + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -574,6 +605,10 @@ The current version available is %1 (or later), but you still have version %2 installed. + + n/a + + You can download the latest version of the Nero AAC encoder from the Nero website at: diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts index 1baa5715..e4995499 100644 --- a/etc/Translation/LameXP_DE.ts +++ b/etc/Translation/LameXP_DE.ts @@ -135,6 +135,37 @@ About Third-party Software Über Drittsoftware + + n/a + n/v + + + + AudioFileModel + + Profile + Profil + + + Channels + Kanäle + + + Samplerate + Abtastrate + + + Bitdepth + Bittiefe + + + Type + Typ + + + Version + Version + DecoderRegistry @@ -843,6 +874,10 @@ Translation Files Übersetzungsdateien + + n/a + n/v + MetaInfo diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts index 19602926..bac4be10 100644 --- a/etc/Translation/LameXP_ES.ts +++ b/etc/Translation/LameXP_ES.ts @@ -136,6 +136,37 @@ About Third-party Software Acerca del Software de terceros + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -843,6 +874,10 @@ Quit LameXP Salir de LameXP + + n/a + + MetaInfo diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts index 7bee31ec..a8354620 100644 --- a/etc/Translation/LameXP_FR.ts +++ b/etc/Translation/LameXP_FR.ts @@ -138,6 +138,37 @@ About Third-party Software A propos des logiciels tiers + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -847,6 +878,10 @@ Votre dossier TEMP est situé ici: Quit LameXP Quitter LameXP + + n/a + + MetaInfo diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts index 7df507f7..771e5a57 100644 --- a/etc/Translation/LameXP_IT.ts +++ b/etc/Translation/LameXP_IT.ts @@ -135,6 +135,37 @@ Silk Icons - Over 700 icons in PNG format + + n/a + + + + + AudioFileModel + + Profile + + + + Channels + + + + Samplerate + + + + Bitdepth + + + + Type + + + + Version + + DecoderRegistry @@ -843,6 +874,10 @@ Translation Files + + n/a + + MetaInfo diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm index bbb61c78..16ea56dd 100644 Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ diff --git a/src/Config.h b/src/Config.h index c0fdcf57..8bd2de26 100644 --- a/src/Config.h +++ b/src/Config.h @@ -25,7 +25,7 @@ #define VER_LAMEXP_MAJOR 4 #define VER_LAMEXP_MINOR_HI 0 #define VER_LAMEXP_MINOR_LO 0 -#define VER_LAMEXP_BUILD 231 +#define VER_LAMEXP_BUILD 232 #define VER_LAMEXP_SUFFIX TechPreview /* diff --git a/src/Dialog_About.cpp b/src/Dialog_About.cpp index 7469e4ba..570514f6 100644 --- a/src/Dialog_About.cpp +++ b/src/Dialog_About.cpp @@ -357,7 +357,7 @@ QString AboutDialog::makeToolText(const QString &toolName, const QString &toolBi if(!toolBin.isEmpty()) { - verStr = lamexp_version2string(toolVerFmt, lamexp_tool_version(toolBin)); + verStr = lamexp_version2string(toolVerFmt, lamexp_tool_version(toolBin), tr("n/a")); } toolText += QString("
  • %1 (%2)
    ").arg(toolName, verStr); diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp index ea0afd90..3abc6930 100644 --- a/src/Dialog_MainWindow.cpp +++ b/src/Dialog_MainWindow.cpp @@ -450,6 +450,7 @@ void MainWindow::changeEvent(QEvent *e) m_showFolderContextAction->setText(tr("Browse Selected Folder")); m_metaInfoModel->clearData(); + updateEncoder(m_settings->compressionEncoder()); } } @@ -648,7 +649,7 @@ void MainWindow::windowShown(void) { QString messageText; messageText += QString("%1
    ").arg(tr("LameXP detected that your version of the Nero AAC encoder is outdated!")); - messageText += QString("%1

    ").arg(tr("The current version available is %1 (or later), but you still have version %2 installed.").arg(lamexp_version2string("?.?.?.?", lamexp_toolver_neroaac()), lamexp_version2string("?.?.?.?", lamexp_tool_version("neroAacEnc.exe")))); + messageText += QString("%1

    ").arg(tr("The current version available is %1 (or later), but you still have version %2 installed.").arg(lamexp_version2string("?.?.?.?", lamexp_toolver_neroaac(), tr("n/a")), lamexp_version2string("?.?.?.?", lamexp_tool_version("neroAacEnc.exe"), tr("n/a")))); messageText += QString("%1
    ").arg(tr("You can download the latest version of the Nero AAC encoder from the Nero website at:")); messageText += "" + LINK(AboutDialog::neroAacUrl) + "
    "; QMessageBox::information(this, tr("AAC Encoder Outdated"), messageText); diff --git a/src/Global.cpp b/src/Global.cpp index 5279fca0..0a563f95 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -841,11 +841,11 @@ unsigned int lamexp_tool_version(const QString &toolName) /* * Version number to human-readable string */ -const QString lamexp_version2string(const QString &pattern, unsigned int version) +const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText) { if(version == UINT_MAX) { - return "n/a"; + return defaultText; } QString result = pattern; diff --git a/src/Global.h b/src/Global.h index 7a3e052e..4ee912cb 100644 --- a/src/Global.h +++ b/src/Global.h @@ -103,7 +103,7 @@ static const char* LAMEXP_DEFAULT_LANGID = "en"; //Auxiliary functions bool lamexp_clean_folder(const QString folderPath); -const QString lamexp_version2string(const QString &pattern, unsigned int version); +const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText); QString lamexp_known_folder(lamexp_known_folder_t folder_id); __int64 lamexp_free_diskspace(const QString &path); bool lamexp_remove_file(const QString &filename); diff --git a/src/Model_AudioFile.cpp b/src/Model_AudioFile.cpp index b7dbf405..53d0b748 100644 --- a/src/Model_AudioFile.cpp +++ b/src/Model_AudioFile.cpp @@ -22,6 +22,7 @@ #include "Model_AudioFile.h" #include +#include //////////////////////////////////////////////////////////// // Constructor & Destructor @@ -39,6 +40,52 @@ AudioFileModel::AudioFileModel(const QString &path, const QString &name) m_formatAudioBitdepth = 0; } +AudioFileModel::AudioFileModel(const AudioFileModel &model) +{ + setFilePath(model.m_filePath); + setFileName(model.m_fileName); + setFileArtist(model.m_fileArtist); + setFileAlbum(model.m_fileAlbum); + setFileGenre(model.m_fileGenre); + setFileComment(model.m_fileComment); + setFileYear(model.m_fileYear); + setFilePosition(model.m_filePosition); + setFileDuration(model.m_fileDuration); + + setFormatContainerType(model.m_formatContainerType); + setFormatContainerProfile(model.m_formatContainerProfile); + setFormatAudioType(model.m_formatAudioType); + setFormatAudioProfile(model.m_formatAudioProfile); + setFormatAudioVersion(model.m_formatAudioVersion); + setFormatAudioSamplerate(model.m_formatAudioSamplerate); + setFormatAudioChannels(model.m_formatAudioChannels); + setFormatAudioBitdepth(model.m_formatAudioBitdepth); +} + +AudioFileModel &AudioFileModel::operator=(const AudioFileModel &model) +{ + setFilePath(model.m_filePath); + setFileName(model.m_fileName); + setFileArtist(model.m_fileArtist); + setFileAlbum(model.m_fileAlbum); + setFileGenre(model.m_fileGenre); + setFileComment(model.m_fileComment); + setFileYear(model.m_fileYear); + setFilePosition(model.m_filePosition); + setFileDuration(model.m_fileDuration); + + setFormatContainerType(model.m_formatContainerType); + setFormatContainerProfile(model.m_formatContainerProfile); + setFormatAudioType(model.m_formatAudioType); + setFormatAudioProfile(model.m_formatAudioProfile); + setFormatAudioVersion(model.m_formatAudioVersion); + setFormatAudioSamplerate(model.m_formatAudioSamplerate); + setFormatAudioChannels(model.m_formatAudioChannels); + setFormatAudioBitdepth(model.m_formatAudioBitdepth); + + return (*this); +} + AudioFileModel::~AudioFileModel(void) { } @@ -154,7 +201,7 @@ const QString AudioFileModel::formatContainerInfo(void) const if(!m_formatContainerType.isEmpty()) { QString info = m_formatContainerType; - if(!m_formatContainerProfile.isEmpty()) info.append(" (Profile: ").append(m_formatContainerProfile).append(")"); + if(!m_formatContainerProfile.isEmpty()) info.append(QString(" (%1: %2)").arg(tr("Profile"), m_formatContainerProfile)); return info; } else @@ -171,17 +218,17 @@ const QString AudioFileModel::formatAudioBaseInfo(void) const if(m_formatAudioChannels) { if(!info.isEmpty()) info.append(", "); - info.append("Channels: ").append(QString::number(m_formatAudioChannels)); + info.append(QString("%1: %2").arg(tr("Channels"), QString::number(m_formatAudioChannels))); } if(m_formatAudioSamplerate) { if(!info.isEmpty()) info.append(", "); - info.append("Samplerate: ").append(QString::number(m_formatAudioSamplerate)).append(" Hz"); + info.append(QString("%1: %2 Hz").arg(tr("Samplerate"), QString::number(m_formatAudioSamplerate))); } if(m_formatAudioBitdepth) { if(!info.isEmpty()) info.append(", "); - info.append("Bitdepth: ").append(QString::number(m_formatAudioBitdepth)).append(" Bit"); + info.append(QString("%1: %2 Bit").arg(tr("Bitdepth"), QString::number(m_formatAudioBitdepth))); } return info; } @@ -198,16 +245,16 @@ const QString AudioFileModel::formatAudioCompressInfo(void) const QString info; if(!m_formatAudioProfile.isEmpty() || !m_formatAudioVersion.isEmpty()) { - info.append("Type: "); + info.append(QString("%1: ").arg(tr("Type"))); } info.append(m_formatAudioType); if(!m_formatAudioProfile.isEmpty()) { - info.append(", Profile: ").append(m_formatAudioProfile); + info.append(QString(", %1: %2").arg(tr("Profile"), m_formatAudioProfile)); } if(!m_formatAudioVersion.isEmpty()) { - info.append(", Version: ").append(m_formatAudioVersion); + info.append(QString(", %1: %2").arg(tr("Version"), m_formatAudioVersion)); } return info; } diff --git a/src/Model_AudioFile.h b/src/Model_AudioFile.h index c66152b5..9733e89e 100644 --- a/src/Model_AudioFile.h +++ b/src/Model_AudioFile.h @@ -21,13 +21,17 @@ #pragma once +#include #include -class AudioFileModel +class AudioFileModel : public QObject { + Q_OBJECT public: AudioFileModel(const QString &path = QString(), const QString &name = QString()); + AudioFileModel(const AudioFileModel &model); + AudioFileModel &operator=(const AudioFileModel &model); ~AudioFileModel(void); //-----------------------