diff --git a/src/libs/cover/impl/Image.cpp b/src/libs/cover/impl/Image.cpp index f05fcc73..f48c852f 100644 --- a/src/libs/cover/impl/Image.cpp +++ b/src/libs/cover/impl/Image.cpp @@ -63,6 +63,15 @@ Image::load(const std::vector& rawData) return true; } + catch (Magick::WarningCoder& e) + { + return true; + } + catch (Magick::Warning& e) + { + LMS_LOG(COVER, WARNING) << "Caught Magick warning while loading raw image: " << e.what(); + return false; + } catch (Magick::Exception& e) { LMS_LOG(COVER, ERROR) << "Caught Magick exception while loading raw image: " << e.what(); @@ -79,6 +88,15 @@ Image::load(const std::filesystem::path& p) return true; } + catch (Magick::WarningCoder& e) + { + return true; + } + catch (Magick::Warning& e) + { + LMS_LOG(COVER, WARNING) << "Caught Magick warning while loading raw image: " << e.what(); + return false; + } catch (Magick::Exception& e) { LMS_LOG(COVER, ERROR) << "Caught Magick exception while loading image from file '" << p.string() << "': " << e.what(); diff --git a/src/libs/database/impl/Db.cpp b/src/libs/database/impl/Db.cpp index 87bdf5d7..c3ec1d60 100644 --- a/src/libs/database/impl/Db.cpp +++ b/src/libs/database/impl/Db.cpp @@ -34,6 +34,7 @@ Db::Db(const std::filesystem::path& dbPath) std::unique_ptr connection {std::make_unique(dbPath.string())}; connection->executeSql("pragma journal_mode=WAL"); + connection->executeSql("pragma synchronous=normal"); // connection->setProperty("show-queries", "true"); auto connectionPool = std::make_unique(std::move(connection), 10);