diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-23 19:58:28 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-23 19:58:28 -0400 |
| commit | 1e532d4f53bd65fc1dca3ec8cc6408f1b1efdc02 (patch) | |
| tree | e02408b59e4fc1a058f6e31e996c5a954d0f1448 /MediaBrowser.Api/Images/ImageByNameService.cs | |
| parent | 40836f194bc43b6d03277d70e6fb3c79732132a8 (diff) | |
factor device pixel ratio into downloaded image size
Diffstat (limited to 'MediaBrowser.Api/Images/ImageByNameService.cs')
| -rw-r--r-- | MediaBrowser.Api/Images/ImageByNameService.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Api/Images/ImageByNameService.cs b/MediaBrowser.Api/Images/ImageByNameService.cs index c741dd8a8..8c543c8c2 100644 --- a/MediaBrowser.Api/Images/ImageByNameService.cs +++ b/MediaBrowser.Api/Images/ImageByNameService.cs @@ -118,20 +118,20 @@ namespace MediaBrowser.Api.Images public object Get(GetMediaInfoImages request) { - return ToOptimizedResult(GetImageList(_appPaths.MediaInfoImagesPath)); + return ToOptimizedResult(GetImageList(_appPaths.MediaInfoImagesPath, true)); } public object Get(GetRatingImages request) { - return ToOptimizedResult(GetImageList(_appPaths.RatingsPath)); + return ToOptimizedResult(GetImageList(_appPaths.RatingsPath, true)); } public object Get(GetGeneralImages request) { - return ToOptimizedResult(GetImageList(_appPaths.GeneralPath)); + return ToOptimizedResult(GetImageList(_appPaths.GeneralPath, false)); } - private List<ImageByNameInfo> GetImageList(string path) + private List<ImageByNameInfo> GetImageList(string path, bool supportsThemes) { try { @@ -142,7 +142,7 @@ namespace MediaBrowser.Api.Images { Name = Path.GetFileNameWithoutExtension(i.FullName), FileLength = i.Length, - Theme = GetThemeName(i.FullName, path), + Theme = supportsThemes ? GetThemeName(i.FullName, path) : null, Format = i.Extension.ToLower().TrimStart('.') }) .OrderBy(i => i.Name) |
