mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Merge pull request #1094 from cvium/imageprocessor_exception
Skip processing of images that don't exist
This commit is contained in:
commit
58068e249a
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue