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
154b8d50b2
commit
71271abcb1
8 changed files with 44 additions and 17 deletions
|
@ -2,6 +2,25 @@
|
|||
|
||||
var currentItem;
|
||||
|
||||
function deleteTimer(page, id) {
|
||||
|
||||
Dashboard.confirm("Are you sure you wish to cancel this recording?", "Confirm Recording Cancellation", function (result) {
|
||||
|
||||
if (result) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.cancelLiveTvTimer(id).done(function () {
|
||||
|
||||
Dashboard.alert('Recording cancelled.');
|
||||
|
||||
reload(page);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -48,6 +67,12 @@
|
|||
ApiClient.sendWebSocketMessage("Context", vals.join('|'));
|
||||
}
|
||||
|
||||
if (item.TimerId) {
|
||||
$('#cancelRecordingButtonContainer', page).show();
|
||||
} else {
|
||||
$('#cancelRecordingButtonContainer', page).hide();
|
||||
}
|
||||
|
||||
if (!item.TimerId && !item.SeriesTimerId) {
|
||||
$('#recordButtonContainer', page).show();
|
||||
} else {
|
||||
|
@ -101,6 +126,11 @@
|
|||
});
|
||||
});
|
||||
|
||||
$('#btnCancelRecording', page).on('click', function () {
|
||||
|
||||
deleteTimer(page, currentItem.TimerId);
|
||||
});
|
||||
|
||||
}).on('pageshow', "#liveTvProgramPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue