aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Images/ImageByNameService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-23 19:58:28 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-23 19:58:28 -0400
commit1e532d4f53bd65fc1dca3ec8cc6408f1b1efdc02 (patch)
treee02408b59e4fc1a058f6e31e996c5a954d0f1448 /MediaBrowser.Api/Images/ImageByNameService.cs
parent40836f194bc43b6d03277d70e6fb3c79732132a8 (diff)
factor device pixel ratio into downloaded image size
Diffstat (limited to 'MediaBrowser.Api/Images/ImageByNameService.cs')
-rw-r--r--MediaBrowser.Api/Images/ImageByNameService.cs10
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)