From cc16fd3af88fe3bfdc68d026e63609e41ffd1628 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 15 Nov 2013 11:00:50 -0500 Subject: [PATCH] show/hide live tv menu based on installed services --- MediaBrowser.WebDashboard/ApiClient.js | 33 +++++++++++++++++++++++ MediaBrowser.WebDashboard/packages.config | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index a5621ff4d..d6f82184c 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -378,6 +378,39 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; + self.getLiveTvServices = function (options) { + + var url = self.getUrl("/LiveTv/Services", options || {}); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + self.getLiveTvChannels = function (options) { + + var url = self.getUrl("/LiveTv/Channels", options || {}); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + self.getLiveTvRecordings = function (options) { + + var url = self.getUrl("/LiveTv/Recordings", options || {}); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + /** * Gets the current server status */ diff --git a/MediaBrowser.WebDashboard/packages.config b/MediaBrowser.WebDashboard/packages.config index 846153190..d431a43a5 100644 --- a/MediaBrowser.WebDashboard/packages.config +++ b/MediaBrowser.WebDashboard/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file