diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-24 13:49:24 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-10-24 13:49:24 -0400 |
| commit | 146c7ac4bf58059771d1da24ab3a60a76d35ba2d (patch) | |
| tree | 906ed3e777b0dd62f629f20c9bce7d51c7bfa40e /MediaBrowser.WebDashboard/ApiClient.js | |
| parent | a09d449c003c0c828a877fd75eceaefc66e835b5 (diff) | |
fix double path concatenation
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 |
