diff options
Diffstat (limited to 'MediaBrowser.Api/Images/ImageByNameService.cs')
| -rw-r--r-- | MediaBrowser.Api/Images/ImageByNameService.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Images/ImageByNameService.cs b/MediaBrowser.Api/Images/ImageByNameService.cs index 8c543c8c2..16f3f0c1d 100644 --- a/MediaBrowser.Api/Images/ImageByNameService.cs +++ b/MediaBrowser.Api/Images/ImageByNameService.cs @@ -93,6 +93,7 @@ namespace MediaBrowser.Api.Images { public string Name { get; set; } public string Theme { get; set; } + public string Context { get; set; } public long FileLength { get; set; } public string Format { get; set; } } @@ -142,7 +143,13 @@ namespace MediaBrowser.Api.Images { Name = Path.GetFileNameWithoutExtension(i.FullName), FileLength = i.Length, + + // For themeable images, use the Theme property + // For general images, the same object structure is fine, + // but it's not owned by a theme, so call it Context Theme = supportsThemes ? GetThemeName(i.FullName, path) : null, + Context = supportsThemes ? null : GetThemeName(i.FullName, path), + Format = i.Extension.ToLower().TrimStart('.') }) .OrderBy(i => i.Name) |
