Handle errors during blurhash generation so it does not fail the scan

pull/2676/head
Vasily 5 years ago
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…
Cancel
Save