From f4f63355357bb5b9ae3bf9a8f1800c901f39d3ea Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sun, 15 Apr 2018 15:15:01 +0200 Subject: [PATCH] Updated FileAnalyzer_Task to extract cover artwork with latest MediaInfo version. --- src/Config.h | 2 +- src/Thread_FileAnalyzer_Task.cpp | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Config.h b/src/Config.h index ba68de89..c023b75e 100644 --- a/src/Config.h +++ b/src/Config.h @@ -35,7 +35,7 @@ #define VER_LAMEXP_MINOR_LO 6 #define VER_LAMEXP_TYPE RC #define VER_LAMEXP_PATCH 3 -#define VER_LAMEXP_BUILD 2112 +#define VER_LAMEXP_BUILD 2120 #define VER_LAMEXP_CONFG 2002 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Thread_FileAnalyzer_Task.cpp b/src/Thread_FileAnalyzer_Task.cpp index fd69a24a..c5abd269 100644 --- a/src/Thread_FileAnalyzer_Task.cpp +++ b/src/Thread_FileAnalyzer_Task.cpp @@ -283,9 +283,7 @@ const AudioFileModel& AnalyzeTask::analyzeMediaFile(const QString &filePath, Aud QByteArray coverData; QStringList params; - params << QString("--Language=raw"); - params << QString("-f"); - params << QString("--Output=XML"); + params << L1S("--Language=raw") << L1S("--Output=XML") << L1S("--Full") << L1S("--Cover_Data=base64"); params << QDir::toNativeSeparators(filePath); QProcess process; @@ -330,7 +328,7 @@ const AudioFileModel& AnalyzeTask::analyzeMediaFile(const QString &filePath, Aud if (dataNext.isEmpty()) { break; /*no more input data*/ } - data += dataNext; + data += dataNext.trimmed(); } } @@ -347,11 +345,11 @@ const AudioFileModel& AnalyzeTask::analyzeMediaFile(const QString &filePath, Aud if (dataNext.isEmpty()) { break; /*no more input data*/ } - data += dataNext; + data += dataNext.trimmed(); } - + #if MUTILS_DEBUG - qDebug("!!!--MEDIA_INFO-->>>\n%s\n<<<--MEDIA_INFO--!!!", data.constData()); + qDebug("-----BEGIN MEDIAINFO-----\n%s\n-----END MEDIAINFO-----", data.constData()); #endif //MUTILS_DEBUG return parseMediaInfo(data, audioFile);