From f663dcc75f0d76f041dc3d5b71f52d44f6790ed5 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Wed, 19 Aug 2015 22:49:43 +0200 Subject: [PATCH] Enable the embedding of cover artwork for the Opus encoder, using the "--picture" parameter. --- doc/Changelog.html | 1 + doc/Changelog.md | 1 + etc/Translation/Blank.ts | 4 ++-- etc/Translation/LameXP_DE.ts | 4 ++-- etc/Translation/LameXP_ES.ts | 4 ++-- etc/Translation/LameXP_FR.ts | 4 ++-- etc/Translation/LameXP_HU.ts | 4 ++-- etc/Translation/LameXP_IT.ts | 4 ++-- etc/Translation/LameXP_KR.ts | 4 ++-- etc/Translation/LameXP_PL.ts | 4 ++-- etc/Translation/LameXP_RU.ts | 4 ++-- etc/Translation/LameXP_SV.ts | 4 ++-- etc/Translation/LameXP_TW.ts | 4 ++-- etc/Translation/LameXP_UK.ts | 4 ++-- etc/Translation/LameXP_ZH.ts | 4 ++-- src/Config.h | 4 ++-- src/Encoder_Abstract.cpp | 8 ++++++-- src/Encoder_MP3.cpp | 24 ++++++++++++------------ src/Encoder_Opus.cpp | 14 ++++++++------ 19 files changed, 56 insertions(+), 48 deletions(-) diff --git a/doc/Changelog.html b/doc/Changelog.html index 281ea972..c3d3048c 100644 --- a/doc/Changelog.html +++ b/doc/Changelog.html @@ -102,6 +102,7 @@ document.write(''+e+'<\/'+'a'+'>');
  • Updated GnuPG to v1.4.19 (2015-02-27), compiled with GCC 4.9.2
  • Fixed potential deadlock in Cue Sheet import dialog when "Browse..." button is clicked
  • Fixed function to restore the default Temp folder, if custom Temp folder doesn't exist anymore
  • +
  • Enable the embedding of cover artwork for Opus encoder (opusenc), using the --picture option
  • Some installer improvements have been implemented (especially in "update" mode)
  • Full support for Windows 10 RTM (Build #10240)
  • diff --git a/doc/Changelog.md b/doc/Changelog.md index 41297a4c..c556ca77 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -19,6 +19,7 @@ * Updated GnuPG to v1.4.19 (2015-02-27), compiled with GCC 4.9.2 * Fixed potential deadlock in Cue Sheet import dialog when "Browse..." button is clicked * Fixed function to restore the default Temp folder, if custom Temp folder doesn't exist anymore +* Enable the embedding of cover artwork for Opus encoder (opusenc), using the ``--picture`` option * Some installer improvements have been implemented (especially in "update" mode) * Full support for Windows 10 RTM (Build #10240) diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index 2a498f1c..4c82d821 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -3545,12 +3545,12 @@ - + Update ready to install. Applicaion will quit... - + Update failed. Please try again or download manually! diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts index 05c1b2cb..61530a7c 100644 --- a/etc/Translation/LameXP_DE.ts +++ b/etc/Translation/LameXP_DE.ts @@ -3528,12 +3528,12 @@ Update wird heruntergeladen, bitte gedulden Sie sich... - + Update ready to install. Applicaion will quit... Update ist bereit zur Installtion. Programm wird beendet... - + Update failed. Please try again or download manually! Update fehlgeschlagen. Bitte versuchen Sie es noch einmal! diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts index 03e87f28..4f77a5b6 100644 --- a/etc/Translation/LameXP_ES.ts +++ b/etc/Translation/LameXP_ES.ts @@ -3528,12 +3528,12 @@ Descargando actualización, espere por favor... - + Update ready to install. Applicaion will quit... Actualización lista para instalar. La aplicación se cerrará... - + Update failed. Please try again or download manually! Actualización fallida. ¡Por favor, vuelva a intentarlo o descárguelo manualmente! diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts index c31c20a0..6fe81f27 100644 --- a/etc/Translation/LameXP_FR.ts +++ b/etc/Translation/LameXP_FR.ts @@ -3538,12 +3538,12 @@ Ouvrir le dossier récursivement... La mise à jour est en cours de téléchargement, veuillez patienter... - + Update ready to install. Applicaion will quit... La mise à jour est prête à être installée. L'application doit se fermer... - + Update failed. Please try again or download manually! La mise à jour a échoué. Veuillez essayer à nouveau ou télécharger manuellement ! diff --git a/etc/Translation/LameXP_HU.ts b/etc/Translation/LameXP_HU.ts index 80e05e1f..e381f76a 100644 --- a/etc/Translation/LameXP_HU.ts +++ b/etc/Translation/LameXP_HU.ts @@ -3545,12 +3545,12 @@ A frissítés letöltése folyamatban van, kis türelmét kérjük... - + Update ready to install. Applicaion will quit... A frissítés készen áll a telepítésre. Az alkalmazás most kilép... - + Update failed. Please try again or download manually! A frissítés sikertelen volt. Próbálja újra, vagy töltse le manuálisan! diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts index 61e0bbad..909daa0c 100644 --- a/etc/Translation/LameXP_IT.ts +++ b/etc/Translation/LameXP_IT.ts @@ -3528,12 +3528,12 @@ Aggiornamento in scaricamento, per favore sii paziente... - + Update ready to install. Applicaion will quit... Aggiornamento pronto per l'installazione. L'Applicazione si chiuderà... - + Update failed. Please try again or download manually! Aggiornamento Fallito. Per favore prova ancora o aggiorna manualmente! diff --git a/etc/Translation/LameXP_KR.ts b/etc/Translation/LameXP_KR.ts index 6e1d8101..221b6bca 100644 --- a/etc/Translation/LameXP_KR.ts +++ b/etc/Translation/LameXP_KR.ts @@ -3509,12 +3509,12 @@ 업데이트를 내려받고 있습니다. 잠시만 기다려주십시오... - + Update ready to install. Applicaion will quit... 업데이트 설치 준비. 프로그램이 종료됩니다... - + Update failed. Please try again or download manually! 업데이트 실패. 다시 시도하거나 업데이트를 수동으로 내려받으시기 바랍니다! diff --git a/etc/Translation/LameXP_PL.ts b/etc/Translation/LameXP_PL.ts index d17e2da8..a168f64e 100644 --- a/etc/Translation/LameXP_PL.ts +++ b/etc/Translation/LameXP_PL.ts @@ -3582,12 +3582,12 @@ Pobieranie aktualizacji w toku, prosze czekać... - + Update ready to install. Applicaion will quit... Aktualizacja gotowa do instalacji. Teraz program zostanie zamknięty... - + Update failed. Please try again or download manually! Aktualizacja zakończona niepowodzeniem. Prosze spróbować ponownie lub zainstalować ręcznie! diff --git a/etc/Translation/LameXP_RU.ts b/etc/Translation/LameXP_RU.ts index 20a4fb8e..9d7c0760 100644 --- a/etc/Translation/LameXP_RU.ts +++ b/etc/Translation/LameXP_RU.ts @@ -3554,12 +3554,12 @@ Скачиваю обновление... - + Update ready to install. Applicaion will quit... Обновление готово к установке. Завершение приложения... - + Update failed. Please try again or download manually! Фак май майнд Не могу установить обновление в автоматическом режиме. Повторите попытку или установите обновление вручную! diff --git a/etc/Translation/LameXP_SV.ts b/etc/Translation/LameXP_SV.ts index f305eb03..ce60f31b 100644 --- a/etc/Translation/LameXP_SV.ts +++ b/etc/Translation/LameXP_SV.ts @@ -3565,12 +3565,12 @@ Uppdatering laddas ner, vänta... - + Update ready to install. Applicaion will quit... Uppdatering klar att installeras. Programmet kommer att avslutas... - + Update failed. Please try again or download manually! Uppdateringen misslyckades. Försök igen, eller ladda ner manuellt! diff --git a/etc/Translation/LameXP_TW.ts b/etc/Translation/LameXP_TW.ts index b27e1a81..433dcd1f 100644 --- a/etc/Translation/LameXP_TW.ts +++ b/etc/Translation/LameXP_TW.ts @@ -3509,12 +3509,12 @@ 正在下載更新,請耐心等待... - + Update ready to install. Applicaion will quit... 準備好安裝更新.應用程序將退出... - + Update failed. Please try again or download manually! 更新失敗.請再試一次或手動下載 ! diff --git a/etc/Translation/LameXP_UK.ts b/etc/Translation/LameXP_UK.ts index 8be1e358..ce0ef450 100644 --- a/etc/Translation/LameXP_UK.ts +++ b/etc/Translation/LameXP_UK.ts @@ -3557,12 +3557,12 @@ Йде завантаження оновлення, будь ласка, зачекайте... - + Update ready to install. Applicaion will quit... Оновлення готове до встановлення. Буде здйснено закриття додатку... - + Update failed. Please try again or download manually! Збій оновлення. Будь ласка, спробуйте ще раз або завантажте оновлення самостійно! diff --git a/etc/Translation/LameXP_ZH.ts b/etc/Translation/LameXP_ZH.ts index 50614ae7..6cb398e5 100644 --- a/etc/Translation/LameXP_ZH.ts +++ b/etc/Translation/LameXP_ZH.ts @@ -3509,12 +3509,12 @@ 正在下载更新,请耐心等待... - + Update ready to install. Applicaion will quit... 更新已准备好安装。应用程序将退出... - + Update failed. Please try again or download manually! 更新失败。请再试一次或手动下载 ! diff --git a/src/Config.h b/src/Config.h index 70c31ee9..522c15c4 100644 --- a/src/Config.h +++ b/src/Config.h @@ -34,8 +34,8 @@ #define VER_LAMEXP_MINOR_HI 1 #define VER_LAMEXP_MINOR_LO 2 #define VER_LAMEXP_TYPE Beta -#define VER_LAMEXP_PATCH 3 -#define VER_LAMEXP_BUILD 1781 +#define VER_LAMEXP_PATCH 4 +#define VER_LAMEXP_BUILD 1784 #define VER_LAMEXP_CONFG 1700 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Encoder_Abstract.cpp b/src/Encoder_Abstract.cpp index 5da1bc4c..afeabeba 100644 --- a/src/Encoder_Abstract.cpp +++ b/src/Encoder_Abstract.cpp @@ -82,8 +82,12 @@ const bool AbstractEncoder::needsTimingInfo(void) //Does this text contain Non-ASCII characters? bool AbstractEncoder::isUnicode(const QString &original) { - QString asLatin1 = QString::fromLatin1(original.toLatin1().constData()); - return (wcscmp(MUTILS_WCHR(original), MUTILS_WCHR(asLatin1)) != 0); + if(!original.isEmpty()) + { + QString asLatin1 = QString::fromLatin1(original.toLatin1().constData()); + return (wcscmp(MUTILS_WCHR(original), MUTILS_WCHR(asLatin1)) != 0); + } + return false; } //Remove "problematic" characters from tag diff --git a/src/Encoder_MP3.cpp b/src/Encoder_MP3.cpp index ea205d3d..cc5ea714 100644 --- a/src/Encoder_MP3.cpp +++ b/src/Encoder_MP3.cpp @@ -201,22 +201,22 @@ bool MP3Encoder::encode(const QString &sourceFile, const AudioFileModel_MetaInfo bool bUseUCS2 = false; - if(!metaInfo.title().isEmpty() && isUnicode(metaInfo.title())) bUseUCS2 = true; - if(!metaInfo.artist().isEmpty() && isUnicode(metaInfo.artist())) bUseUCS2 = true; - if(!metaInfo.album().isEmpty() && isUnicode(metaInfo.album())) bUseUCS2 = true; - if(!metaInfo.genre().isEmpty() && isUnicode(metaInfo.genre())) bUseUCS2 = true; - if(!metaInfo.comment().isEmpty() && isUnicode(metaInfo.comment())) bUseUCS2 = true; + if(isUnicode(metaInfo.title())) bUseUCS2 = true; + if(isUnicode(metaInfo.artist())) bUseUCS2 = true; + if(isUnicode(metaInfo.album())) bUseUCS2 = true; + if(isUnicode(metaInfo.genre())) bUseUCS2 = true; + if(isUnicode(metaInfo.comment())) bUseUCS2 = true; if(bUseUCS2) args << "--id3v2-ucs2"; //Must specify this BEFORE "--tt" and friends! - if(!metaInfo.title().isEmpty()) args << "--tt" << cleanTag(metaInfo.title()); - if(!metaInfo.artist().isEmpty()) args << "--ta" << cleanTag(metaInfo.artist()); - if(!metaInfo.album().isEmpty()) args << "--tl" <