mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07:00
Fix when libgdiplus isn't present.
This commit is contained in:
parent
9e7468d723
commit
336aee7fda
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue