diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-10 15:06:52 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-10 15:06:52 -0500 |
| commit | b91f1e4d16299e5f861c037bf449e5718140d82c (patch) | |
| tree | 626a9bd4bc00bee8b3ce8ab489ad6ac0cc477ceb /Emby.Server.Implementations/Dto/DtoService.cs | |
| parent | 58fad600c943d2cb6d62a475017c1ec677b86718 (diff) | |
support dummied up image a/r's
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 |
