aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-22 20:43:52 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-10-22 20:43:52 -0400
commita59ff2760575abe20dd1ae3a35f83e0439e3f497 (patch)
tree461f6163992a3074d29f5adaaff23b7a178b5b78
parentb54046a6dedf691e33b273d5aa105910efee3c7e (diff)
fix image analysis
-rw-r--r--Emby.Drawing/ImageProcessor.cs2
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs4
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs7
3 files changed, 8 insertions, 5 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index 1c60abfb5..e28d22cf7 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -461,7 +461,7 @@ namespace Emby.Drawing
};
}
- var path = item.Path;
+ var path = info.Path;
_logger.Info("Getting image size for item {0} {1}", item.GetType().Name, path);
var size = GetImageSize(path, allowSlowMethods);
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index a0176e406..0a316fcf1 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1655,9 +1655,9 @@ namespace Emby.Server.Implementations.Dto
return null;
}
}
- catch
+ catch (Exception ex)
{
- //_logger.ErrorException("Failed to determine primary image aspect ratio for {0}", ex, path);
+ //_logger.ErrorException("Failed to determine primary image aspect ratio for {0}", ex, imageInfo.Path);
return null;
}
}
diff --git a/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs
index a9cfea34d..311abf14e 100644
--- a/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs
@@ -30,8 +30,11 @@ namespace Emby.Server.Implementations.Library.Resolvers
// Must be an image file within a photo collection
if (args.IsDirectory)
{
- if (string.Equals(args.GetCollectionType(), CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase) ||
- string.Equals(args.GetCollectionType(), CollectionType.Photos, StringComparison.OrdinalIgnoreCase))
+ // Must be an image file within a photo collection
+ var collectionType = args.GetCollectionType();
+
+ if (string.Equals(collectionType, CollectionType.Photos, StringComparison.OrdinalIgnoreCase) ||
+ (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase) && args.GetLibraryOptions().EnablePhotos))
{
if (HasPhotos(args))
{