mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Always use 7zip instead of p7zip
This commit is contained in:
parent
d54602c72f
commit
5715801616
@ -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<double>(cover.width()) / static_cast<double>(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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user