1
0
Fork 0
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:
Luke Pulverenti 2014-01-13 00:41:00 -05:00
parent 154b8d50b2
commit 71271abcb1
8 changed files with 44 additions and 17 deletions

View file

@ -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;