mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv screens
This commit is contained in:
parent
c5df20e53c
commit
fb7730efd3
15 changed files with 77 additions and 57 deletions
|
@ -64,7 +64,7 @@
|
|||
preferThumb: !query.IsMovie && params.type != 'RecordingSeries',
|
||||
inheritThumb: params.type == 'Recordings',
|
||||
context: 'livetv',
|
||||
centerText: true,
|
||||
centerText: !supportsImageAnalysis,
|
||||
lazy: true,
|
||||
overlayText: false,
|
||||
showParentTitleOrTitle: true,
|
||||
|
|
|
@ -90,7 +90,8 @@
|
|||
centerText: !cardLayout,
|
||||
vibrant: supportsImageAnalysis,
|
||||
allowBottomPadding: !enableScrollX(),
|
||||
preferThumb: 'auto'
|
||||
preferThumb: 'auto',
|
||||
overlayText: false
|
||||
|
||||
}, cardOptions || {}));
|
||||
|
||||
|
@ -120,8 +121,7 @@
|
|||
cardLayout: true,
|
||||
vibrant: true,
|
||||
preferThumb: true,
|
||||
coverImage: true,
|
||||
overlayText: false
|
||||
coverImage: true
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -217,6 +217,7 @@
|
|||
var moviesPromise;
|
||||
var seriesPromise;
|
||||
var latestPromise;
|
||||
var lastFullRender = 0;
|
||||
|
||||
categorysyncbuttons.init(tabContent);
|
||||
|
||||
|
@ -229,6 +230,10 @@
|
|||
self.renderTab();
|
||||
});
|
||||
|
||||
function enableFullRender() {
|
||||
return (new Date().getTime() - lastFullRender) > 300000;
|
||||
}
|
||||
|
||||
self.preRender = function () {
|
||||
|
||||
activeRecordingsPromise = ApiClient.getLiveTvRecordings({
|
||||
|
@ -240,6 +245,10 @@
|
|||
EnableImageTypes: "Primary,Thumb,Backdrop"
|
||||
});
|
||||
|
||||
if (!enableFullRender()) {
|
||||
return;
|
||||
}
|
||||
|
||||
latestPromise = ApiClient.getLiveTvRecordings({
|
||||
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
|
@ -291,23 +300,29 @@
|
|||
};
|
||||
|
||||
self.renderTab = function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
renderActiveRecordings(tabContent, activeRecordingsPromise);
|
||||
renderLatestRecordings(tabContent, latestPromise);
|
||||
renderMovieRecordings(tabContent, moviesPromise);
|
||||
renderEpisodeRecordings(tabContent, seriesPromise);
|
||||
renderSportsRecordings(tabContent, sportsPromise);
|
||||
renderKidsRecordings(tabContent, kidsPromise);
|
||||
|
||||
ApiClient.getLiveTvRecordingGroups({
|
||||
if (enableFullRender()) {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
userId: Dashboard.getCurrentUserId()
|
||||
renderLatestRecordings(tabContent, latestPromise);
|
||||
renderMovieRecordings(tabContent, moviesPromise);
|
||||
renderEpisodeRecordings(tabContent, seriesPromise);
|
||||
renderSportsRecordings(tabContent, sportsPromise);
|
||||
renderKidsRecordings(tabContent, kidsPromise);
|
||||
|
||||
}).then(function (result) {
|
||||
ApiClient.getLiveTvRecordingGroups({
|
||||
|
||||
renderRecordingGroups(tabContent, result.Items);
|
||||
});
|
||||
userId: Dashboard.getCurrentUserId()
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
renderRecordingGroups(tabContent, result.Items);
|
||||
});
|
||||
|
||||
lastFullRender = new Date().getTime();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -103,9 +103,12 @@
|
|||
});
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
var lastFullRender = 0;
|
||||
function enableFullRender() {
|
||||
return (new Date().getTime() - lastFullRender) > 300000;
|
||||
}
|
||||
|
||||
loadRecommendedPrograms(page);
|
||||
function reload(page) {
|
||||
|
||||
renderActiveRecordings(page, ApiClient.getLiveTvRecordings({
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
|
@ -115,6 +118,12 @@
|
|||
EnableImageTypes: "Primary,Thumb,Backdrop"
|
||||
}));
|
||||
|
||||
if (!enableFullRender()) {
|
||||
return;
|
||||
}
|
||||
|
||||
loadRecommendedPrograms(page);
|
||||
|
||||
ApiClient.getLiveTvRecommendedPrograms({
|
||||
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
|
@ -181,6 +190,7 @@
|
|||
|
||||
renderItems(page, result.Items, 'upcomingKidsItems');
|
||||
});
|
||||
lastFullRender = new Date().getTime();
|
||||
}
|
||||
|
||||
function renderItems(page, items, sectionClass, overlayButton, shape) {
|
||||
|
|
|
@ -148,8 +148,8 @@
|
|||
|
||||
dlg.classList.add('promptDialog');
|
||||
|
||||
html += '<div class="promptDialogContent" style="padding:1em;">';
|
||||
html += '<h2>';
|
||||
html += '<div class="promptDialogContent" style="padding:1.5em;">';
|
||||
html += '<h2 style="margin-top:.5em;">';
|
||||
html += (playerInfo.deviceName || playerInfo.name);
|
||||
html += '</h2>';
|
||||
|
||||
|
@ -157,7 +157,7 @@
|
|||
|
||||
if (playerInfo.supportedCommands.indexOf('DisplayContent') != -1) {
|
||||
|
||||
html += '<label class="checkboxContainer" style="margin-bottom:0;">';
|
||||
html += '<label class="checkboxContainer">';
|
||||
var checkedHtml = MediaController.enableDisplayMirroring() ? ' checked' : '';
|
||||
html += '<input type="checkbox" is="emby-checkbox" class="chkMirror"' + checkedHtml + '/>';
|
||||
html += '<span>' + Globalize.translate('OptionEnableDisplayMirroring') + '</span>';
|
||||
|
@ -166,15 +166,11 @@
|
|||
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="promptDialogButtons">';
|
||||
html += '<div style="margin-top:1em;display:flex;justify-content: flex-end;">';
|
||||
|
||||
// On small layouts papepr dialog doesn't respond very well. this button isn't that important here anyway.
|
||||
if (screen.availWidth >= 600) {
|
||||
html += '<button is="emby-button" type="button" class="btnRemoteControl promptDialogButton">' + Globalize.translate('ButtonRemoteControl') + '</button>';
|
||||
}
|
||||
|
||||
html += '<button is="emby-button" type="button" class="btnDisconnect promptDialogButton">' + Globalize.translate('ButtonDisconnect') + '</button>';
|
||||
html += '<button is="emby-button" type="button" class="btnCancel promptDialogButton">' + Globalize.translate('ButtonCancel') + '</button>';
|
||||
html += '<button is="emby-button" type="button" class="button-flat button-accent-flat btnRemoteControl promptDialogButton">' + Globalize.translate('ButtonRemoteControl') + '</button>';
|
||||
html += '<button is="emby-button" type="button" class="button-flat button-accent-flat btnDisconnect promptDialogButton ">' + Globalize.translate('ButtonDisconnect') + '</button>';
|
||||
html += '<button is="emby-button" type="button" class="button-flat button-accent-flat btnCancel promptDialogButton">' + Globalize.translate('ButtonCancel') + '</button>';
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue