aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/ApiClient.js
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
-rw-r--r--MediaBrowser.WebDashboard/ApiClient.js58
1 files changed, 54 insertions, 4 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js
index 53f4fde2a..a42c27949 100644
--- a/MediaBrowser.WebDashboard/ApiClient.js
+++ b/MediaBrowser.WebDashboard/ApiClient.js
@@ -389,13 +389,21 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
});
};
- self.getLiveTvChannel = function (id) {
+ self.getLiveTvChannel = function (id, userId) {
if (!id) {
throw new Error("null id");
}
- var url = self.getUrl("LiveTv/Channels/" + id);
+ var options = {
+
+ };
+
+ if (userId) {
+ options.userId = userId;
+ }
+
+ var url = self.getUrl("LiveTv/Channels/" + id, options);
return self.ajax({
type: "GET",
@@ -437,13 +445,44 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
});
};
- self.getLiveTvRecording = function (id) {
+ self.getLiveTvRecording = function (id, userId) {
if (!id) {
throw new Error("null id");
}
- var url = self.getUrl("LiveTv/Recordings/" + id);
+ var options = {
+
+ };
+
+ if (userId) {
+ options.userId = userId;
+ }
+
+ var url = self.getUrl("LiveTv/Recordings/" + id, options);
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
+ self.getLiveTvProgram = function (id, userId) {
+
+ if (!id) {
+ throw new Error("null id");
+ }
+
+ var options = {
+
+ };
+
+ if (userId) {
+ options.userId = userId;
+ }
+
+ var url = self.getUrl("LiveTv/Programs/" + id, options);
return self.ajax({
type: "GET",
@@ -506,6 +545,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
});
};
+ self.getNewLiveTvTimerDefaults = function () {
+
+ var url = self.getUrl("LiveTv/Timers/Defaults");
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
self.createLiveTvTimer = function (item) {
if (!item) {