소스 검색

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

Vasily 5 년 전
부모
커밋
6c9dc04189
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      Emby.Server.Implementations/Library/LibraryManager.cs

+ 9 - 1
Emby.Server.Implementations/Library/LibraryManager.cs

@@ -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);