From 336aee7fdaa18ed13665f24bea04d40f7f341024 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Mon, 23 Jan 2017 18:42:05 +0100 Subject: [PATCH] Fix when libgdiplus isn't present. --- .../MediaCover/CoverAlreadyExistsSpecification.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs b/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs index 6e29988a6..54fc79a0a 100644 --- a/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs +++ b/src/NzbDrone.Core/MediaCover/CoverAlreadyExistsSpecification.cs @@ -46,11 +46,18 @@ namespace NzbDrone.Core.MediaCover { 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);