mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Skip processing of images that don't exist
This commit is contained in:
parent
c6c398179a
commit
7322485a6d
@ -180,6 +180,12 @@ namespace Emby.Drawing
|
|||||||
|
|
||||||
var supportedImageInfo = await GetSupportedImage(originalImagePath, dateModified).ConfigureAwait(false);
|
var supportedImageInfo = await GetSupportedImage(originalImagePath, dateModified).ConfigureAwait(false);
|
||||||
originalImagePath = supportedImageInfo.path;
|
originalImagePath = supportedImageInfo.path;
|
||||||
|
|
||||||
|
if (!File.Exists(originalImagePath))
|
||||||
|
{
|
||||||
|
return (originalImagePath, MimeTypes.GetMimeType(originalImagePath), dateModified);
|
||||||
|
}
|
||||||
|
|
||||||
dateModified = supportedImageInfo.dateModified;
|
dateModified = supportedImageInfo.dateModified;
|
||||||
bool requiresTransparency = TransparentImageTypes.Contains(Path.GetExtension(originalImagePath));
|
bool requiresTransparency = TransparentImageTypes.Contains(Path.GetExtension(originalImagePath));
|
||||||
|
|
||||||
@ -265,8 +271,6 @@ namespace Emby.Drawing
|
|||||||
{
|
{
|
||||||
// If it fails for whatever reason, return the original image
|
// If it fails for whatever reason, return the original image
|
||||||
_logger.LogError(ex, "Error encoding 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);
|
return (originalImagePath, MimeTypes.GetMimeType(originalImagePath), dateModified);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
Loading…
x
Reference in New Issue
Block a user