diff options
Diffstat (limited to 'Emby.Server.Implementations/Dto/DtoService.cs')
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs | 16 |
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 |
