diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-14 01:36:36 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-14 01:36:36 -0400 |
| commit | ae4c4c6ce50c03d0e7bcfe1d2b6eca715dd2f0ff (patch) | |
| tree | d7b215c00f3796b0dbd5569f562a0e1b2b4a511b /MediaBrowser.WebDashboard/ApiClient.js | |
| parent | c2be2238281623d567b2083ec995b1f09c66a722 (diff) | |
#247 - Web client - Hide views that have no content
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 b23e337ef..a44bdc4d2 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -102,7 +102,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { self.encodeName = function (name) { name = name.split('/').join('-'); - + name = name.split('?').join('-'); var val = $.param({ name: name }); @@ -2279,6 +2279,23 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + self.getItemCounts = function (userId) { + + var options = {}; + + if (userId) { + options.userId = userId; + } + + var url = self.getUrl("Items/Counts", options); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + /** Gets a variety of item counts that a person appears in */ |
