diff options
Diffstat (limited to 'Emby.Photos/PhotoProvider.cs')
| -rw-r--r-- | Emby.Photos/PhotoProvider.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs index 3a29b86a50..11a7db47d3 100644 --- a/Emby.Photos/PhotoProvider.cs +++ b/Emby.Photos/PhotoProvider.cs @@ -163,10 +163,14 @@ namespace Emby.Photos if (!item.Width.HasValue || !item.Height.HasValue) { - var size = _imageProcessor.GetImageSize(item.Path); + var img = item.GetImageInfo(ImageType.Primary, 0); + var size = _imageProcessor.GetImageSize(item, img, false, false); - item.Width = Convert.ToInt32(size.Width); - item.Height = Convert.ToInt32(size.Height); + if (size.Width > 0 && size.Height > 0) + { + item.Width = Convert.ToInt32(size.Width); + item.Height = Convert.ToInt32(size.Height); + } } const ItemUpdateType result = ItemUpdateType.ImageUpdate | ItemUpdateType.MetadataImport; |
