mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add ability to create timer
This commit is contained in:
parent
f030db9841
commit
121d1de0af
10 changed files with 355 additions and 16 deletions
58
ApiClient.js
58
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue