Browse Source

update image size

Luke Pulverenti 9 years ago
parent
commit
3bca39bb68
1 changed files with 5 additions and 3 deletions
  1. 5 3
      Emby.Drawing/ImageProcessor.cs

+ 5 - 3
Emby.Drawing/ImageProcessor.cs

@@ -421,9 +421,11 @@ namespace Emby.Drawing
             {
             {
                 size = GetImageSizeInternal(path, allowSlowMethod);
                 size = GetImageSizeInternal(path, allowSlowMethod);
 
 
-                StartSaveImageSizeTimer();
-
-                _cachedImagedSizes.AddOrUpdate(cacheHash, size, (keyName, oldValue) => size);
+                if (size.Width > 0 && size.Height > 0)
+                {
+                    StartSaveImageSizeTimer();
+                    _cachedImagedSizes.AddOrUpdate(cacheHash, size, (keyName, oldValue) => size);
+                }
             }
             }
 
 
             return size;
             return size;