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