mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
updated nuget + live tv
This commit is contained in:
parent
07241dc539
commit
fadec6653a
14 changed files with 109 additions and 27 deletions
1
dashboard-ui/scripts/livetvseriestimer.js
Normal file
1
dashboard-ui/scripts/livetvseriestimer.js
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
dashboard-ui/scripts/livetvseriestimers.js
Normal file
1
dashboard-ui/scripts/livetvseriestimers.js
Normal file
|
@ -0,0 +1 @@
|
|||
|
|
@ -2,6 +2,25 @@
|
|||
|
||||
var currentItem;
|
||||
|
||||
function deleteTimer(page, id) {
|
||||
|
||||
Dashboard.confirm("Are you sure you wish to cancel this timer?", "Confirm Timer Cancellation", function (result) {
|
||||
|
||||
if (result) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.cancelLiveTvTimer(id).done(function () {
|
||||
|
||||
Dashboard.alert('Timer deleted');
|
||||
|
||||
reload(page);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function renderTimer(page, item) {
|
||||
|
||||
currentItem = item;
|
||||
|
@ -15,6 +34,17 @@
|
|||
$('#txtRequiredPrePaddingSeconds', page).val(item.RequiredPrePaddingSeconds);
|
||||
$('#txtRequiredPostPaddingSeconds', page).val(item.RequiredPostPaddingSeconds);
|
||||
|
||||
$('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
|
||||
$('.status', page).html('Status: ' + item.Status);
|
||||
|
||||
if (item.SeriesTimerId) {
|
||||
|
||||
$('.seriesTimerLink', page).html('<a href="livetvseriestimer.html?id=' + item.SeriesTimerId + '">View Series</a>').show().trigger('create');
|
||||
|
||||
} else {
|
||||
$('.seriesTimerLink', page).hide();
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
|
@ -35,6 +65,12 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('#btnCancelTimer', page).on('click', function () {
|
||||
|
||||
deleteTimer(page, currentItem.Id);
|
||||
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#liveTvTimerPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
(function ($, document, apiClient) {
|
||||
|
||||
function editTimer(page, id) {
|
||||
|
||||
}
|
||||
|
||||
function deleteTimer(page, id) {
|
||||
|
||||
Dashboard.confirm("Are you sure you wish to cancel this timer?", "Confirm Timer Cancellation", function (result) {
|
||||
|
@ -40,7 +36,7 @@
|
|||
html += '<th>Start</th>';
|
||||
html += '<th class="tabletColumn">Length</th>';
|
||||
html += '<th class="tabletColumn">Status</th>';
|
||||
html += '<th class="desktopColumn">Recurring</th>';
|
||||
html += '<th class="desktopColumn">Series</th>';
|
||||
|
||||
html += '</tr>';
|
||||
|
||||
|
@ -86,9 +82,10 @@
|
|||
|
||||
html += '<td class="desktopColumn">';
|
||||
|
||||
if (timer.IsRecurring) {
|
||||
html += ' ';
|
||||
html += '✓';
|
||||
if (timer.SeriesTimerId) {
|
||||
html += '<a href="livetvseriestimer.html?id=' + timer.SeriesTimerId + '">';
|
||||
html += 'View';
|
||||
html += '</a>';
|
||||
}
|
||||
|
||||
html += '</td>';
|
||||
|
@ -100,13 +97,6 @@
|
|||
|
||||
var elem = $('#items', page).html(html).trigger('create');
|
||||
|
||||
$('.btnEditTimer', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-timerid');
|
||||
|
||||
editTimer(page, id);
|
||||
});
|
||||
|
||||
$('.btnDeleteTimer', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-timerid');
|
||||
|
@ -120,7 +110,7 @@
|
|||
function reload(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
||||
apiClient.getLiveTvTimers().done(function (result) {
|
||||
|
||||
renderTimers(page, result.Items);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue