mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-04 13:22:52 +01:00
add ability to create timer
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user