Handle errors during blurhash generation so it does not fail the scan
This commit is contained in:
parent
f575415e0b
commit
6c9dc04189
|
@ -1841,7 +1841,15 @@ namespace Emby.Server.Implementations.Library
|
|||
ImageDimensions size = _imageProcessor.GetImageDimensions(item, img);
|
||||
img.Width = size.Width;
|
||||
img.Height = size.Height;
|
||||
img.BlurHash = _imageProcessor.GetImageBlurHash(img.Path);
|
||||
try
|
||||
{
|
||||
img.BlurHash = _imageProcessor.GetImageBlurHash(img.Path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Cannot compute blurhash for {0}", img.Path);
|
||||
img.BlurHash = string.Empty;
|
||||
}
|
||||
});
|
||||
|
||||
_itemRepository.SaveImages(item);
|
||||
|
|
Loading…
Reference in New Issue
Block a user