mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add playback of in-progress recordings
This commit is contained in:
parent
ca36b18094
commit
2077019d9a
20 changed files with 88 additions and 395 deletions
|
@ -1,4 +1,4 @@
|
|||
define(['datetime', 'cardBuilder', 'paper-icon-button-light', 'emby-button'], function (datetime, cardBuilder) {
|
||||
define(['datetime', 'cardBuilder', 'imageLoader', 'paper-icon-button-light', 'emby-button'], function (datetime, cardBuilder, imageLoader) {
|
||||
|
||||
var query = {
|
||||
|
||||
|
@ -6,26 +6,6 @@
|
|||
SortOrder: "Ascending"
|
||||
};
|
||||
|
||||
function deleteSeriesTimer(context, id) {
|
||||
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
confirm(Globalize.translate('MessageConfirmSeriesCancellation'), Globalize.translate('HeaderConfirmSeriesCancellation')).then(function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.cancelLiveTvSeriesTimer(id).then(function () {
|
||||
|
||||
require(['toast'], function (toast) {
|
||||
toast(Globalize.translate('MessageSeriesCancelled'));
|
||||
});
|
||||
|
||||
reload(context);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function renderTimers(context, timers) {
|
||||
|
||||
var html = '';
|
||||
|
@ -43,92 +23,14 @@
|
|||
showSeriesTimerChannel: true
|
||||
});
|
||||
|
||||
//if (timers.length) {
|
||||
// html += '<div class="paperList">';
|
||||
//}
|
||||
|
||||
//for (var i = 0, length = timers.length; i < length; i++) {
|
||||
|
||||
// var timer = timers[i];
|
||||
|
||||
// html += '<div class="listItem">';
|
||||
|
||||
// html += '<i class="md-icon listItemIcon">live_tv</i>';
|
||||
|
||||
// html += '<div class="listItemBody three-line">';
|
||||
// html += '<a class="clearLink" href="livetvseriestimer.html?id=' + timer.Id + '">';
|
||||
// html += '<h3 class="listItemBodyText">';
|
||||
// html += timer.Name;
|
||||
// html += '</h3>';
|
||||
|
||||
// html += '<div class="secondary">';
|
||||
// if (timer.DayPattern) {
|
||||
// html += timer.DayPattern;
|
||||
// }
|
||||
// else {
|
||||
// var days = timer.Days || [];
|
||||
|
||||
// html += days.join(', ');
|
||||
// }
|
||||
|
||||
// if (timer.RecordAnyTime) {
|
||||
|
||||
// html += ' - ' + Globalize.translate('LabelAnytime');
|
||||
// } else {
|
||||
// html += ' - ' + datetime.getDisplayTime(timer.StartDate);
|
||||
// }
|
||||
// html += '</div>';
|
||||
|
||||
// html += '<div class="secondary">';
|
||||
// if (timer.RecordAnyChannel) {
|
||||
// html += Globalize.translate('LabelAllChannels');
|
||||
// }
|
||||
// else if (timer.ChannelId) {
|
||||
// html += timer.ChannelName;
|
||||
// }
|
||||
// html += '</div>';
|
||||
|
||||
// html += '</a>';
|
||||
// html += '</div>';
|
||||
|
||||
// html += '<button type="button" is="paper-icon-button-light" data-seriestimerid="' + timer.Id + '" title="' + Globalize.translate('ButtonCancelSeries') + '" class="btnCancelSeries autoSize"><i class="md-icon">cancel</i></button>';
|
||||
|
||||
// html += '</div>';
|
||||
//}
|
||||
|
||||
//if (timers.length) {
|
||||
// html += '</div>';
|
||||
//}
|
||||
|
||||
var elem = context.querySelector('#items');
|
||||
elem.innerHTML = html;
|
||||
|
||||
//if (timers.length) {
|
||||
// elem.querySelector('.paperList').addEventListener('click', function (e) {
|
||||
|
||||
// var btnCancelSeries = parentWithClass(e.target, 'btnCancelSeries');
|
||||
// if (btnCancelSeries) {
|
||||
// deleteSeriesTimer(context, btnCancelSeries.getAttribute('data-seriestimerid'));
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
imageLoader.lazyChildren(elem);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
while (!elem.classList || !elem.classList.contains(className)) {
|
||||
elem = elem.parentNode;
|
||||
|
||||
if (!elem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
function reload(context, promise) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue