1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-02-25 15:43:08 +00:00

Fix when libgdiplus isn't present.

This commit is contained in:
Leonardo Galli 2017-01-23 18:42:05 +01:00
parent 9e7468d723
commit 336aee7fda

View file

@ -46,11 +46,18 @@ private bool IsValidGDIPlusImage(string filename)
{
try
{
GdiPlusInterop.CheckGdiPlus();
using (var bmp = new Bitmap(filename))
{
}
return true;
}
catch (DllNotFoundException ex)
{
_logger.Error(ex, "Could not find libgdiplus. Cannot test if image is corrupt.");
return true;
}
catch (Exception ex)
{
_logger.Debug(ex, "Corrupted image found at: {0}. Redownloading...", filename);