mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 02:33:33 +01:00
add ability to create timer
This commit is contained in:
@@ -495,6 +495,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
"livetvchannel.js",
|
||||
"livetvchannels.js",
|
||||
"livetvguide.js",
|
||||
"livetvnewrecording.js",
|
||||
"livetvrecording.js",
|
||||
"livetvrecordings.js",
|
||||
"livetvtimer.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) {
|
||||
|
||||
@@ -94,6 +94,9 @@
|
||||
<Content Include="dashboard-ui\livetvchannel.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\livetvnewrecording.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\livetvrecording.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -361,6 +364,9 @@
|
||||
<Content Include="dashboard-ui\livetvtimer.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\livetvnewrecording.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\livetvrecording.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.206" targetFramework="net45" />
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.209" targetFramework="net45" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user