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;

View file

@ -52,7 +52,7 @@
$('.recordingItems', elem).html(LibraryBrowser.getPosterViewHtml({
items: recordings,
shape: "square",
shape: "backdrop",
showTitle: true,
showParentTitle: true,
overlayText: true,
@ -79,7 +79,7 @@
apiClient.getLiveTvRecordings({
userId: Dashboard.getCurrentUserId(),
limit: 15,
limit: 12,
isRecording: false
}).done(function (result) {

View file

@ -15,7 +15,7 @@
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "square",
shape: "backdrop",
showTitle: true,
showParentTitle: true,
overlayText: true,
@ -38,7 +38,7 @@
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "square",
shape: "backdrop",
showTitle: true,
showParentTitle: true,
overlayText: true,