mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
live tv updates
This commit is contained in:
parent
a3b95de459
commit
b0d84e5046
9 changed files with 208 additions and 150 deletions
|
@ -545,9 +545,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getNewLiveTvTimerDefaults = function () {
|
self.getNewLiveTvTimerDefaults = function (options) {
|
||||||
|
|
||||||
var url = self.getUrl("LiveTv/Timers/Defaults");
|
options = options || {};
|
||||||
|
|
||||||
|
var url = self.getUrl("LiveTv/Timers/Defaults", options);
|
||||||
|
|
||||||
return self.ajax({
|
return self.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
|
|
|
@ -25,76 +25,90 @@
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<p>
|
<div style="display: none;" id="eligibleForSeriesFields">
|
||||||
<input type="checkbox" data-mini="true" id="chkRecordSeries" />
|
<p>
|
||||||
<label for="chkRecordSeries">Record Series</label>
|
<input type="checkbox" data-mini="true" id="chkRecordSeries" />
|
||||||
</p>
|
<label for="chkRecordSeries">Record Series</label>
|
||||||
|
</p>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<ul data-role="listview" class="ulForm" id="seriesFields" style="display: none;">
|
||||||
|
<li>
|
||||||
|
<h3>Days</h3>
|
||||||
|
<div data-role="controlgroup">
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkSunday" />
|
||||||
|
<label for="chkSunday">Sunday</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkMonday" />
|
||||||
|
<label for="chkMonday">Monday</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkTuesday" />
|
||||||
|
<label for="chkTuesday">Tuesday</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkWednesday" />
|
||||||
|
<label for="chkWednesday">Wednesday</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkThursday" />
|
||||||
|
<label for="chkThursday">Thursday</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkFriday" />
|
||||||
|
<label for="chkFriday">Friday</label>
|
||||||
|
|
||||||
|
<input type="checkbox" data-mini="true" id="chkSaturday" />
|
||||||
|
<label for="chkSaturday">Saturday</label>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="chkNewOnly">Record only new episodes</label>
|
||||||
|
<input type="checkbox" id="chkNewOnly" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="chkAnyTime">Record program at any time</label>
|
||||||
|
<input type="checkbox" id="chkAnyTime" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="chkAllChannels">Record program on all channels</label>
|
||||||
|
<input type="checkbox" id="chkAllChannels" data-mini="true" />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div data-role="collapsible" data-mini="true">
|
||||||
|
<h3>Pre/Post Padding</h3>
|
||||||
|
<div>
|
||||||
|
<br />
|
||||||
|
<ul data-role="listview" class="ulForm">
|
||||||
|
<li>
|
||||||
|
<label for="txtPrePaddingSeconds">Pre-padding seconds: </label>
|
||||||
|
<input type="number" id="txtPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input type="checkbox" data-mini="true" id="chkPrePaddingRequired" />
|
||||||
|
<label for="chkPrePaddingRequired">Pre-padding is required in order to record.</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div style="height: .5em;"></div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtPostPaddingSeconds">Post-padding seconds: </label>
|
||||||
|
<input type="number" id="txtPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input type="checkbox" data-mini="true" id="chkPostPaddingRequired" />
|
||||||
|
<label for="chkPostPaddingRequired">Post-padding is required in order to record.</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<ul data-role="listview" class="ulForm" id="seriesFields" style="display: none;">
|
|
||||||
<li>
|
|
||||||
<h3>Days</h3>
|
|
||||||
<div data-role="controlgroup">
|
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkSunday" />
|
|
||||||
<label for="chkSunday">Sunday</label>
|
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkMonday" />
|
|
||||||
<label for="chkMonday">Monday</label>
|
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkTuesday" />
|
|
||||||
<label for="chkTuesday">Tuesday</label>
|
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkWednesday" />
|
|
||||||
<label for="chkWednesday">Wednesday</label>
|
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkThursday" />
|
|
||||||
<label for="chkThursday">Thursday</label>
|
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkFriday" />
|
|
||||||
<label for="chkFriday">Friday</label>
|
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkSaturday" />
|
|
||||||
<label for="chkSaturday">Saturday</label>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="chkNewOnly">Record only new episodes</label>
|
|
||||||
<input type="checkbox" id="chkNewOnly" data-mini="true" checked="checked" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="chkAnyTime">Record program at any time</label>
|
|
||||||
<input type="checkbox" id="chkAnyTime" data-mini="true" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="chkAllChannels">Record program on all channels</label>
|
|
||||||
<input type="checkbox" id="chkAllChannels" data-mini="true" />
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
|
||||||
<label for="txtRequestedPrePaddingSeconds">Requested pre-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequestedPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="txtRequestedPostPaddingSeconds">Requested post-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequestedPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="txtRequiredPrePaddingSeconds">Required pre-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequiredPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="txtRequiredPostPaddingSeconds">Required post-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequiredPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<button type="submit" data-theme="b" data-icon="ok" data-mini="true">
|
<button type="submit" data-theme="b" data-icon="ok" data-mini="true">
|
||||||
Save
|
Record
|
||||||
</button>
|
</button>
|
||||||
<button type="button" onclick="Dashboard.navigate('livetvtimers.html');" data-icon="delete" data-mini="true">
|
<button id="btnCancel" type="button" data-icon="delete" data-mini="true">
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -65,22 +65,37 @@
|
||||||
<label for="chkAllChannels">Record program on all channels</label>
|
<label for="chkAllChannels">Record program on all channels</label>
|
||||||
<input type="checkbox" id="chkAllChannels" data-mini="true" />
|
<input type="checkbox" id="chkAllChannels" data-mini="true" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
</ul>
|
||||||
<label for="txtRequestedPrePaddingSeconds">Requested pre-padding seconds: </label>
|
<div data-role="collapsible" data-mini="true">
|
||||||
<input type="number" id="txtRequestedPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
<h3>Pre/Post Padding</h3>
|
||||||
</li>
|
<div>
|
||||||
<li>
|
<br />
|
||||||
<label for="txtRequestedPostPaddingSeconds">Requested post-padding seconds: </label>
|
<ul data-role="listview" class="ulForm">
|
||||||
<input type="number" id="txtRequestedPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
<li>
|
||||||
</li>
|
<label for="txtPrePaddingSeconds">Pre-padding seconds: </label>
|
||||||
<li>
|
<input type="number" id="txtPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
||||||
<label for="txtRequiredPrePaddingSeconds">Required pre-padding seconds: </label>
|
</li>
|
||||||
<input type="number" id="txtRequiredPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
<li>
|
||||||
</li>
|
<input type="checkbox" data-mini="true" id="chkPrePaddingRequired" />
|
||||||
<li>
|
<label for="chkPrePaddingRequired">Pre-padding is required in order to record.</label>
|
||||||
<label for="txtRequiredPostPaddingSeconds">Required post-padding seconds: </label>
|
</li>
|
||||||
<input type="number" id="txtRequiredPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" data-mini="true" />
|
<li>
|
||||||
</li>
|
<div style="height: .5em;"></div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtPostPaddingSeconds">Post-padding seconds: </label>
|
||||||
|
<input type="number" id="txtPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input type="checkbox" data-mini="true" id="chkPostPaddingRequired" />
|
||||||
|
<label for="chkPostPaddingRequired">Post-padding is required in order to record.</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
<li>
|
||||||
<button type="submit" data-theme="b" data-icon="ok" data-mini="true">
|
<button type="submit" data-theme="b" data-icon="ok" data-mini="true">
|
||||||
Save
|
Save
|
||||||
|
|
|
@ -25,26 +25,39 @@
|
||||||
<span class="seriesTimerLink" style="margin-left: 2em;"></span>
|
<span class="seriesTimerLink" style="margin-left: 2em;"></span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div data-role="collapsible" data-mini="true">
|
||||||
|
<h3>Pre/Post Padding</h3>
|
||||||
|
<div>
|
||||||
|
<br />
|
||||||
|
<ul data-role="listview" class="ulForm">
|
||||||
|
<li>
|
||||||
|
<label for="txtPrePaddingSeconds">Pre-padding seconds: </label>
|
||||||
|
<input type="number" id="txtPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input type="checkbox" data-mini="true" id="chkPrePaddingRequired" />
|
||||||
|
<label for="chkPrePaddingRequired">Pre-padding is required in order to record.</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div style="height: .5em;"></div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="txtPostPaddingSeconds">Post-padding seconds: </label>
|
||||||
|
<input type="number" id="txtPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input type="checkbox" data-mini="true" id="chkPostPaddingRequired" />
|
||||||
|
<label for="chkPostPaddingRequired">Post-padding is required in order to record.</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
<li>
|
|
||||||
<label for="txtRequestedPrePaddingSeconds">Requested pre-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequestedPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="txtRequestedPostPaddingSeconds">Requested post-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequestedPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="txtRequiredPrePaddingSeconds">Required pre-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequiredPrePaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="txtRequiredPostPaddingSeconds">Required post-padding seconds: </label>
|
|
||||||
<input type="number" id="txtRequiredPostPaddingSeconds" pattern="[0-9]*" required="required" min="0" />
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<button type="submit" data-theme="b" data-icon="ok" data-mini="true">
|
<button type="submit" data-theme="b" data-icon="ok" data-mini="true">
|
||||||
Save
|
Save
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<label for="chkMovies">Movies</label>
|
<label for="chkMovies">Movies</label>
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkEpisodes" name="chkEpisodes" />
|
<input type="checkbox" data-mini="true" id="chkEpisodes" name="chkEpisodes" />
|
||||||
<label for="chkEpisodes">TV Episodes</label>
|
<label for="chkEpisodes">Episodes</label>
|
||||||
|
|
||||||
<input type="checkbox" data-mini="true" id="chkOtherVideos" name="chkOtherVideos" />
|
<input type="checkbox" data-mini="true" id="chkOtherVideos" name="chkOtherVideos" />
|
||||||
<label for="chkOtherVideos">Other Videos</label>
|
<label for="chkOtherVideos">Other Videos</label>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
(function ($, document, apiClient) {
|
(function ($, document, apiClient) {
|
||||||
|
|
||||||
var currentProgram;
|
var currentProgram;
|
||||||
var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
||||||
|
|
||||||
function renderRecording(page, defaultTimer, program) {
|
function renderRecording(page, defaultTimer, program) {
|
||||||
|
|
||||||
|
@ -29,21 +28,22 @@
|
||||||
|
|
||||||
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(program));
|
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(program));
|
||||||
|
|
||||||
$('#txtRequestedPrePaddingSeconds', page).val(defaultTimer.RequestedPrePaddingSeconds);
|
$('#chkNewOnly', page).checked(defaultTimer.RecordNewOnly).checkboxradio('refresh');
|
||||||
$('#txtRequestedPostPaddingSeconds', page).val(defaultTimer.RequestedPostPaddingSeconds);
|
$('#chkAllChannels', page).checked(defaultTimer.RecordAnyChannel).checkboxradio('refresh');
|
||||||
$('#txtRequiredPrePaddingSeconds', page).val(defaultTimer.RequiredPrePaddingSeconds);
|
$('#chkAnyTime', page).checked(defaultTimer.RecordAnyTime).checkboxradio('refresh');
|
||||||
$('#txtRequiredPostPaddingSeconds', page).val(defaultTimer.RequiredPostPaddingSeconds);
|
|
||||||
|
|
||||||
try {
|
$('#txtPrePaddingSeconds', page).val(defaultTimer.PrePaddingSeconds);
|
||||||
|
$('#txtPostPaddingSeconds', page).val(defaultTimer.PostPaddingSeconds);
|
||||||
var startDate = parseISO8601Date(program.StartDate, { toLocal: true });
|
$('#chkPrePaddingRequired', page).checked(defaultTimer.IsPrePaddingRequired).checkboxradio('refresh');
|
||||||
|
$('#chkPostPaddingRequired', page).checked(defaultTimer.IsPostPaddingRequired).checkboxradio('refresh');
|
||||||
$('#chk' + daysOfWeek[startDate.getDay()], page).checked(true).checkboxradio('refresh');
|
|
||||||
|
|
||||||
|
if (program.IsSeries) {
|
||||||
|
$('#eligibleForSeriesFields', page).show();
|
||||||
|
} else {
|
||||||
|
$('#eligibleForSeriesFields', page).hide();
|
||||||
}
|
}
|
||||||
catch (e) {
|
|
||||||
console.log("Error parsing date: " + program.StartDate);
|
selectDays(page, defaultTimer.Days);
|
||||||
}
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,10 @@
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
var programid = getParameterByName('programid');
|
var programId = getParameterByName('programid');
|
||||||
|
|
||||||
var promise1 = apiClient.getNewLiveTvTimerDefaults();
|
var promise1 = apiClient.getNewLiveTvTimerDefaults({ programId: programId });
|
||||||
var promise2 = apiClient.getLiveTvProgram(programid, Dashboard.getCurrentUserId());
|
var promise2 = apiClient.getLiveTvProgram(programId, Dashboard.getCurrentUserId());
|
||||||
|
|
||||||
$.when(promise1, promise2).done(function (response1, response2) {
|
$.when(promise1, promise2).done(function (response1, response2) {
|
||||||
|
|
||||||
|
@ -66,8 +66,24 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectDays(page, days) {
|
||||||
|
|
||||||
|
var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||||
|
|
||||||
|
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
|
||||||
|
|
||||||
|
var day = daysOfWeek[i];
|
||||||
|
|
||||||
|
$('#chk' + day, page).checked(days.indexOf(day) != -1).checkboxradio('refresh');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function getDays(page) {
|
function getDays(page) {
|
||||||
|
|
||||||
|
var daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||||
|
|
||||||
var days = [];
|
var days = [];
|
||||||
|
|
||||||
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
|
for (var i = 0, length = daysOfWeek.length; i < length; i++) {
|
||||||
|
@ -89,12 +105,12 @@
|
||||||
|
|
||||||
var form = this;
|
var form = this;
|
||||||
|
|
||||||
apiClient.getNewLiveTvTimerDefaults().done(function (item) {
|
apiClient.getNewLiveTvTimerDefaults({ programId: currentProgram.Id }).done(function (item) {
|
||||||
|
|
||||||
item.RequestedPrePaddingSeconds = $('#txtRequestedPrePaddingSeconds', form).val();
|
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val();
|
||||||
item.RequestedPostPaddingSeconds = $('#txtRequestedPostPaddingSeconds', form).val();
|
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val();
|
||||||
item.RequiredPrePaddingSeconds = $('#txtRequiredPrePaddingSeconds', form).val();
|
item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked();
|
||||||
item.RequiredPostPaddingSeconds = $('#txtRequiredPostPaddingSeconds', form).val();
|
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();
|
||||||
|
|
||||||
item.RecordNewOnly = $('#chkNewOnly', form).checked();
|
item.RecordNewOnly = $('#chkNewOnly', form).checked();
|
||||||
item.RecordAnyChannel = $('#chkAllChannels', form).checked();
|
item.RecordAnyChannel = $('#chkAllChannels', form).checked();
|
||||||
|
@ -102,14 +118,6 @@
|
||||||
|
|
||||||
item.Days = getDays(form);
|
item.Days = getDays(form);
|
||||||
|
|
||||||
item.Name = currentProgram.Name;
|
|
||||||
item.ProgramId = currentProgram.Id;
|
|
||||||
item.ChannelName = currentProgram.ChannelName;
|
|
||||||
item.ChannelId = currentProgram.ChannelId;
|
|
||||||
item.Overview = currentProgram.Overview;
|
|
||||||
item.StartDate = currentProgram.StartDate;
|
|
||||||
item.EndDate = currentProgram.EndDate;
|
|
||||||
|
|
||||||
if ($('#chkRecordSeries', form).checked()) {
|
if ($('#chkRecordSeries', form).checked()) {
|
||||||
|
|
||||||
apiClient.createLiveTvSeriesTimer(item).done(function () {
|
apiClient.createLiveTvSeriesTimer(item).done(function () {
|
||||||
|
@ -158,6 +166,12 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#btnCancel', page).on('click', function () {
|
||||||
|
|
||||||
|
Dashboard.navigate('livetvchannel.html?id=' + currentProgram.ChannelId);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#liveTvNewRecordingPage", function () {
|
}).on('pagebeforeshow', "#liveTvNewRecordingPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
|
@ -28,10 +28,10 @@
|
||||||
$('.itemName', page).html(item.Name);
|
$('.itemName', page).html(item.Name);
|
||||||
$('.overview', page).html(item.Overview || '');
|
$('.overview', page).html(item.Overview || '');
|
||||||
|
|
||||||
$('#txtRequestedPrePaddingSeconds', page).val(item.RequestedPrePaddingSeconds);
|
$('#txtPrePaddingSeconds', page).val(item.PrePaddingSeconds);
|
||||||
$('#txtRequestedPostPaddingSeconds', page).val(item.RequestedPostPaddingSeconds);
|
$('#txtPostPaddingSeconds', page).val(item.PostPaddingSeconds);
|
||||||
$('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds);
|
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired).checkboxradio('refresh');
|
||||||
$('#txtRequiredPostPaddingSeconds', page).val(item.RequiredPostPaddingSeconds);
|
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired).checkboxradio('refresh');
|
||||||
|
|
||||||
$('#chkNewOnly', page).checked(item.RecordNewOnly).checkboxradio('refresh');
|
$('#chkNewOnly', page).checked(item.RecordNewOnly).checkboxradio('refresh');
|
||||||
$('#chkAllChannels', page).checked(item.RecordAnyChannel).checkboxradio('refresh');
|
$('#chkAllChannels', page).checked(item.RecordAnyChannel).checkboxradio('refresh');
|
||||||
|
@ -97,10 +97,10 @@
|
||||||
|
|
||||||
apiClient.getLiveTvSeriesTimer(currentItem.Id).done(function (item) {
|
apiClient.getLiveTvSeriesTimer(currentItem.Id).done(function (item) {
|
||||||
|
|
||||||
item.RequestedPrePaddingSeconds = $('#txtRequestedPrePaddingSeconds', form).val();
|
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val();
|
||||||
item.RequestedPostPaddingSeconds = $('#txtRequestedPostPaddingSeconds', form).val();
|
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val();
|
||||||
item.RequiredPrePaddingSeconds = $('#txtRequiredPrePaddingSeconds', form).val();
|
item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked();
|
||||||
item.RequiredPostPaddingSeconds = $('#txtRequiredPostPaddingSeconds', form).val();
|
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();
|
||||||
|
|
||||||
item.RecordNewOnly = $('#chkNewOnly', form).checked();
|
item.RecordNewOnly = $('#chkNewOnly', form).checked();
|
||||||
item.RecordAnyChannel = $('#chkAllChannels', form).checked();
|
item.RecordAnyChannel = $('#chkAllChannels', form).checked();
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
$('.channel', page).html('<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
|
$('.channel', page).html('<a href="livetvchannel.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
|
||||||
$('.overview', page).html(item.Overview || '');
|
$('.overview', page).html(item.Overview || '');
|
||||||
|
|
||||||
$('#txtRequestedPrePaddingSeconds', page).val(item.RequestedPrePaddingSeconds);
|
$('#txtPrePaddingSeconds', page).val(item.PrePaddingSeconds);
|
||||||
$('#txtRequestedPostPaddingSeconds', page).val(item.RequestedPostPaddingSeconds);
|
$('#txtPostPaddingSeconds', page).val(item.PostPaddingSeconds);
|
||||||
$('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds);
|
$('#chkPrePaddingRequired', page).checked(item.IsPrePaddingRequired).checkboxradio('refresh');
|
||||||
$('#txtRequiredPostPaddingSeconds', page).val(item.RequiredPostPaddingSeconds);
|
$('#chkPostPaddingRequired', page).checked(item.IsPostPaddingRequired).checkboxradio('refresh');
|
||||||
|
|
||||||
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
|
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
|
||||||
$('.status', page).html('Status: ' + item.Status);
|
$('.status', page).html('Status: ' + item.Status);
|
||||||
|
@ -56,12 +56,12 @@
|
||||||
|
|
||||||
apiClient.getLiveTvTimer(currentItem.Id).done(function (item) {
|
apiClient.getLiveTvTimer(currentItem.Id).done(function (item) {
|
||||||
|
|
||||||
item.RequestedPrePaddingSeconds = $('#txtRequestedPrePaddingSeconds', form).val();
|
item.PrePaddingSeconds = $('#txtPrePaddingSeconds', form).val();
|
||||||
item.RequestedPostPaddingSeconds = $('#txtRequestedPostPaddingSeconds', form).val();
|
item.PostPaddingSeconds = $('#txtPostPaddingSeconds', form).val();
|
||||||
item.RequiredPrePaddingSeconds = $('#txtRequiredPrePaddingSeconds', form).val();
|
item.IsPrePaddingRequired = $('#chkPrePaddingRequired', form).checked();
|
||||||
item.RequiredPostPaddingSeconds = $('#txtRequiredPostPaddingSeconds', form).val();
|
item.IsPostPaddingRequired = $('#chkPostPaddingRequired', form).checked();
|
||||||
|
|
||||||
ApiClient.updateLiveTvTimer(item).done(function() {
|
ApiClient.updateLiveTvTimer(item).done(function () {
|
||||||
Dashboard.alert('Timer Saved');
|
Dashboard.alert('Timer Saved');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.209" targetFramework="net45" />
|
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.210" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
Loading…
Add table
Add a link
Reference in a new issue