diff --git a/ApiClient.js b/ApiClient.js index 16e2ae3b96..53f4fde2af 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -506,20 +506,110 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; - self.createLiveTvTimer = function (options) { + self.createLiveTvTimer = function (item) { - if (!options) { - throw new Error("null options"); + if (!item) { + throw new Error("null item"); } - var url = self.getUrl("LiveTv/Timers", options); + var url = self.getUrl("LiveTv/Timers"); return self.ajax({ type: "POST", + url: url, + data: JSON.stringify(item), + contentType: "application/json" + }); + }; + + self.updateLiveTvTimer = function (item) { + + if (!item) { + throw new Error("null item"); + } + + var url = self.getUrl("LiveTv/Timers/" + item.Id); + + return self.ajax({ + type: "POST", + url: url, + data: JSON.stringify(item), + contentType: "application/json" + }); + }; + + self.getLiveTvSeriesTimers = function (options) { + + var url = self.getUrl("LiveTv/SeriesTimers", options || {}); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + self.getLiveTvSeriesTimer = function (id) { + + if (!id) { + throw new Error("null id"); + } + + var url = self.getUrl("LiveTv/SeriesTimers/" + id); + + return self.ajax({ + type: "GET", + url: url, + dataType: "json" + }); + }; + + self.cancelLiveTvSeriesTimer = function (id) { + + if (!id) { + throw new Error("null id"); + } + + var url = self.getUrl("LiveTv/SeriesTimers/" + id); + + return self.ajax({ + type: "DELETE", url: url }); }; + self.createLiveTvSeriesTimer = function (item) { + + if (!item) { + throw new Error("null item"); + } + + var url = self.getUrl("LiveTv/SeriesTimers"); + + return self.ajax({ + type: "POST", + url: url, + data: JSON.stringify(item), + contentType: "application/json" + }); + }; + + self.updateLiveTvSeriesTimer = function (item) { + + if (!item) { + throw new Error("null item"); + } + + var url = self.getUrl("LiveTv/SeriesTimers/" + item.Id); + + return self.ajax({ + type: "POST", + url: url, + data: JSON.stringify(item), + contentType: "application/json" + }); + }; + /** * Gets the current server status */ diff --git a/dashboard-ui/advanced.html b/dashboard-ui/advanced.html index 4040505b3f..60de0d5aa6 100644 --- a/dashboard-ui/advanced.html +++ b/dashboard-ui/advanced.html @@ -12,7 +12,7 @@ +

Cache Path

+

Miscellaneous

- diff --git a/dashboard-ui/livetvseriestimer.html b/dashboard-ui/livetvseriestimer.html index 3dac91d204..f48ebd5723 100644 --- a/dashboard-ui/livetvseriestimer.html +++ b/dashboard-ui/livetvseriestimer.html @@ -13,9 +13,63 @@ Series Timers
-
-
+
+

+ +

+

+ +

+ Cancel Series +

+ +
+
+ + +
+ + diff --git a/dashboard-ui/livetvtimer.html b/dashboard-ui/livetvtimer.html index 9a4548b142..ba187dda8e 100644 --- a/dashboard-ui/livetvtimer.html +++ b/dashboard-ui/livetvtimer.html @@ -13,7 +13,7 @@ Series Timers
-
+

@@ -56,6 +56,10 @@
+ + diff --git a/dashboard-ui/metadata.html b/dashboard-ui/metadata.html index bf74a28dc4..c123850340 100644 --- a/dashboard-ui/metadata.html +++ b/dashboard-ui/metadata.html @@ -18,36 +18,36 @@