diff options
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
| -rw-r--r-- | MediaBrowser.WebDashboard/ApiClient.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 8c2dfc720..97a443e84 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -2018,11 +2018,28 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi options.imageType = "logo"; - var logoItemId = item.HasLogo ? item.Id : item.ParentLogoItemId; + var logoItemId = item.ImageTags && item.ImageTags.Logo ? item.Id : item.ParentLogoItemId; return logoItemId ? self.getImageUrl(logoItemId, options) : null; }; + self.getThumbImageUrl = function (item, options) { + + if (!item) { + throw new Error("null item"); + } + + options = options || { + + }; + + options.imageType = "thumb"; + + var itemId = item.ImageTags && item.ImageTags.Thumb ? item.Id : item.ParentThumbItemId; + + return itemId ? self.getImageUrl(itemId, options) : null; + }; + /** * Constructs an array of backdrop image url's for an item * If the item doesn't have any backdrops, it will inherit them from a parent |
