Ignore warnings from coders when loading cover images. fixes #48
This commit is contained in:
@@ -63,6 +63,15 @@ Image::load(const std::vector<unsigned char>& rawData)
|
|||||||
|
|
||||||
return true;
|
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)
|
catch (Magick::Exception& e)
|
||||||
{
|
{
|
||||||
LMS_LOG(COVER, ERROR) << "Caught Magick exception while loading raw image: " << e.what();
|
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;
|
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)
|
catch (Magick::Exception& e)
|
||||||
{
|
{
|
||||||
LMS_LOG(COVER, ERROR) << "Caught Magick exception while loading image from file '" << p.string() << "': " << e.what();
|
LMS_LOG(COVER, ERROR) << "Caught Magick exception while loading image from file '" << p.string() << "': " << e.what();
|
||||||
|
|||||||
Reference in New Issue
Block a user