From 5715801616202366f87db489993c0275e05d6dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 8 Sep 2024 12:23:27 +0200 Subject: [PATCH] Always use 7zip instead of p7zip --- YACReaderLibrary/initial_comic_info_extractor.cpp | 8 ++++---- YACReaderLibrary/library_creator.cpp | 2 +- YACReaderLibrary/main.cpp | 2 +- YACReaderLibrary/xml_info_library_scanner.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/YACReaderLibrary/initial_comic_info_extractor.cpp b/YACReaderLibrary/initial_comic_info_extractor.cpp index eb543397..7cacf466 100644 --- a/YACReaderLibrary/initial_comic_info_extractor.cpp +++ b/YACReaderLibrary/initial_comic_info_extractor.cpp @@ -156,15 +156,15 @@ void InitialComicInfoExtractor::saveCover(const QString &path, const QImage &cov { QImage scaled; if (cover.width() > cover.height()) { - scaled = cover.scaledToWidth(640, Qt::SmoothTransformation); + scaled = cover.scaledToWidth(820, Qt::SmoothTransformation); } else { auto aspectRatio = static_cast(cover.width()) / static_cast(cover.height()); auto maxAllowedAspectRatio = 0.5; if (aspectRatio < maxAllowedAspectRatio) { // cover is too tall, e.g. webtoon - scaled = cover.scaledToHeight(960, Qt::SmoothTransformation); + scaled = cover.scaledToHeight(1220, Qt::SmoothTransformation); } else { - scaled = cover.scaledToWidth(480, Qt::SmoothTransformation); + scaled = cover.scaledToWidth(640, Qt::SmoothTransformation); } } - scaled.save(_target, 0, 75); + scaled.save(_target, "WEBP", 75); } diff --git a/YACReaderLibrary/library_creator.cpp b/YACReaderLibrary/library_creator.cpp index c6953bab..609c91db 100644 --- a/YACReaderLibrary/library_creator.cpp +++ b/YACReaderLibrary/library_creator.cpp @@ -143,7 +143,7 @@ void LibraryCreator::run() #if !defined use_unarr && !defined use_libarchive // check for 7z lib #if defined Q_OS_UNIX && !defined Q_OS_MACOS - QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/p7zip/7z.so"); + QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/7zip/7z.so"); #else QLibrary *sevenzLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/7z"); #endif diff --git a/YACReaderLibrary/main.cpp b/YACReaderLibrary/main.cpp index 5aae101b..b5c14281 100644 --- a/YACReaderLibrary/main.cpp +++ b/YACReaderLibrary/main.cpp @@ -47,7 +47,7 @@ void logSystemAndConfig() #ifdef Q_OS_WIN if (QLibrary::isLibrary(QApplication::applicationDirPath() + "/utils/7z.dll")) #elif defined Q_OS_UNIX && !defined Q_OS_MACOS - if (QLibrary::isLibrary(QString(LIBDIR) + "/yacreader/7z.so") | QLibrary::isLibrary(QString(LIBDIR) + "/p7zip/7z.so")) + if (QLibrary::isLibrary(QString(LIBDIR) + "/yacreader/7z.so") | QLibrary::isLibrary(QString(LIBDIR) + "/7zip/7z.so")) #else if (QLibrary::isLibrary(QApplication::applicationDirPath() + "/utils/7z.so")) #endif diff --git a/YACReaderLibrary/xml_info_library_scanner.cpp b/YACReaderLibrary/xml_info_library_scanner.cpp index 47fc6fcb..3f59e254 100644 --- a/YACReaderLibrary/xml_info_library_scanner.cpp +++ b/YACReaderLibrary/xml_info_library_scanner.cpp @@ -47,7 +47,7 @@ void XMLInfoLibraryScanner::run() #if !defined use_unarr && !defined use_libarchive // check for 7z lib #if defined Q_OS_UNIX && !defined Q_OS_MACOS - QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/p7zip/7z.so"); + QLibrary *sevenzLib = new QLibrary(QString(LIBDIR) + "/7zip/7z.so"); #else QLibrary *sevenzLib = new QLibrary(QCoreApplication::applicationDirPath() + "/utils/7z"); #endif