aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-02-10 15:08:01 -0500
committerGitHub <noreply@github.com>2017-02-10 15:08:01 -0500
commitda89dceba0775f8ad2d5469e092b0ffa0b972a9a (patch)
tree1f63e94be646df22edd8ebdeafae944ddde74270 /Emby.Server.Implementations
parentdc764821470627071200507169527d650bbafb5c (diff)
parent825bb32d7b49681625c0363e59f152ea2f5f09f2 (diff)
Merge pull request #2463 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 9c50ad5da..c2cefe754 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1396,7 +1396,7 @@ namespace Emby.Server.Implementations.Dto
}
catch (Exception ex)
{
-
+
}
}
}
@@ -1630,8 +1630,20 @@ namespace Emby.Server.Implementations.Dto
return null;
}
+ var supportedEnhancers = _imageProcessor.GetSupportedEnhancers(item, ImageType.Primary).ToList();
+
ImageSize size;
+ if (supportedEnhancers.Count == 0)
+ {
+ var defaultAspectRatio = item.GetDefaultPrimaryImageAspectRatio();
+
+ if (defaultAspectRatio.HasValue)
+ {
+ return defaultAspectRatio.Value;
+ }
+ }
+
try
{
size = _imageProcessor.GetImageSize(imageInfo);
@@ -1642,8 +1654,6 @@ namespace Emby.Server.Implementations.Dto
return null;
}
- var supportedEnhancers = _imageProcessor.GetSupportedEnhancers(item, ImageType.Primary).ToList();
-
foreach (var enhancer in supportedEnhancers)
{
try