aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
authorLogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com>2019-03-16 00:26:12 -0700
committerGitHub <noreply@github.com>2019-03-16 00:26:12 -0700
commit9df150679416b3d894afaab28a5e48c07d2d9226 (patch)
tree51f9a731e9e1a59560314e26c5635542f9631ed3 /Emby.Drawing/ImageProcessor.cs
parent1ee016c99745ed4a29f8995de1478ab6a6e410e9 (diff)
parent2d0844b5dbf08869896c5479c10675c4fe7fa988 (diff)
Merge pull request #2 from LogicalPhallacy/master
update lockoutfix to latest for testing
Diffstat (limited to 'Emby.Drawing/ImageProcessor.cs')
-rw-r--r--Emby.Drawing/ImageProcessor.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index faaeb5af8..6d209d8d0 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -180,6 +180,12 @@ namespace Emby.Drawing
var supportedImageInfo = await GetSupportedImage(originalImagePath, dateModified).ConfigureAwait(false);
originalImagePath = supportedImageInfo.path;
+
+ if (!File.Exists(originalImagePath))
+ {
+ return (originalImagePath, MimeTypes.GetMimeType(originalImagePath), dateModified);
+ }
+
dateModified = supportedImageInfo.dateModified;
bool requiresTransparency = TransparentImageTypes.Contains(Path.GetExtension(originalImagePath));
@@ -265,8 +271,6 @@ namespace Emby.Drawing
{
// If it fails for whatever reason, return the original image
_logger.LogError(ex, "Error encoding image");
-
- // Just spit out the original file if all the options are default
return (originalImagePath, MimeTypes.GetMimeType(originalImagePath), dateModified);
}
finally