mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add chapter image error handling
This commit is contained in:
parent
638fe11131
commit
3a5dad0e64
14 changed files with 123 additions and 190 deletions
|
@ -104,10 +104,11 @@
|
|||
}
|
||||
|
||||
.btnCardOptions {
|
||||
text-align: right;
|
||||
float: right;
|
||||
padding: 5px 0 2px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 0 !important;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.mediaSourceIndicator {
|
||||
|
@ -202,6 +203,7 @@
|
|||
|
||||
.cardFooter {
|
||||
padding: .5em .3em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.visualCardBox-cardScalable, .visualCardBox-cardFooter {
|
||||
|
@ -253,10 +255,39 @@
|
|||
opacity: .6;
|
||||
}
|
||||
|
||||
.cardText-rightmargin {
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
.cardCenteredText {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.textActionButton {
|
||||
border: 0 !important;
|
||||
background: transparent;
|
||||
border: 0 !important;
|
||||
padding: 0 !important;
|
||||
cursor: pointer;
|
||||
outline: none !important;
|
||||
color: inherit;
|
||||
vertical-align: middle;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
/*display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;*/
|
||||
}
|
||||
|
||||
.textActionButton:hover {
|
||||
text-decoration: underline;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.cardFooterLogo {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.cardImageIcon {
|
||||
width: 12vh;
|
||||
height: 12vh;
|
||||
|
|
|
@ -669,7 +669,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
return 'defaultCardColor' + getDefaultColorIndex(str);
|
||||
}
|
||||
|
||||
function getCardTextLines(lines, cssClass, forceLines, addSecondaryClass) {
|
||||
function getCardTextLines(lines, cssClass, forceLines, isOuterFooter, cardLayout) {
|
||||
|
||||
var html = '';
|
||||
|
||||
|
@ -680,10 +680,14 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
|
||||
var text = lines[i];
|
||||
|
||||
if (i == 1 && addSecondaryClass) {
|
||||
if (i == 1 && isOuterFooter) {
|
||||
cssClass += ' cardText-secondary';
|
||||
}
|
||||
|
||||
if (isOuterFooter && cardLayout) {
|
||||
cssClass += ' cardText-rightmargin';
|
||||
}
|
||||
|
||||
if (text) {
|
||||
html += "<div class='" + cssClass + "'>";
|
||||
html += text;
|
||||
|
@ -702,16 +706,22 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
return html;
|
||||
}
|
||||
|
||||
function getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerClass, progressHtml, isOuterFooter) {
|
||||
function getCardFooterText(item, apiClient, options, showTitle, forceName, overlayText, imgUrl, footerClass, progressHtml, isOuterFooter) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var showOtherText = isOuterFooter ? !overlayText : overlayText;
|
||||
|
||||
if (isOuterFooter && options.cardLayout && !layoutManager.tv) {
|
||||
|
||||
if (options.cardFooterAside == 'logo') {
|
||||
|
||||
}
|
||||
else if (options.cardFooterAside != 'none') {
|
||||
var moreIcon = appHost.moreIcon == 'dots-horiz' ? '' : '';
|
||||
html += '<button is="paper-icon-button-light" class="itemAction btnCardOptions autoSize" data-action="menu"><i class="md-icon">' + moreIcon + '</i></button>';
|
||||
}
|
||||
}
|
||||
|
||||
var cssClass = options.centerText && !options.cardLayout ? "cardText cardTextCentered" : "cardText";
|
||||
|
||||
|
@ -867,15 +877,41 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
|
||||
lines.push(text || ' ');
|
||||
|
||||
if (item.ChannelId) {
|
||||
|
||||
var channelText = item.ChannelName;
|
||||
//var logoHeight = 32;
|
||||
|
||||
//if (item.ChannelPrimaryImageTag) {
|
||||
// channelText = '<img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" class="lazy cardFooterLogo" style="height:' + logoHeight + 'px" data-src="' + apiClient.getScaledImageUrl(item.ChannelId, {
|
||||
// type: "Primary",
|
||||
// height: logoHeight,
|
||||
// tag: item.ChannelPrimaryImageTag
|
||||
// }) + '" />' + channelText;
|
||||
//} else {
|
||||
// channelText += '<div style="height:' + logoHeight + 'px;width:0;"></div>';
|
||||
//}
|
||||
|
||||
lines.push(getTextActionButton({
|
||||
|
||||
Id: item.ChannelId,
|
||||
Name: item.ChannelName,
|
||||
Type: 'TvChannel',
|
||||
MediaType: item.MediaType,
|
||||
IsFolder: false
|
||||
|
||||
}, channelText));
|
||||
} else {
|
||||
lines.push(item.ChannelName || ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((showTitle || !imgUrl) && forceName && overlayText && lines.length == 1) {
|
||||
lines = [];
|
||||
}
|
||||
|
||||
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter);
|
||||
html += getCardTextLines(lines, cssClass, !options.overlayText, isOuterFooter, options.cardLayout);
|
||||
|
||||
if (progressHtml) {
|
||||
html += progressHtml;
|
||||
|
@ -1062,7 +1098,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
if (overlayText) {
|
||||
|
||||
footerCssClass = progressHtml ? 'innerCardFooter fullInnerCardFooter' : 'innerCardFooter';
|
||||
innerCardFooter += getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, false);
|
||||
innerCardFooter += getCardFooterText(item, apiClient, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, false);
|
||||
footerOverlayed = true;
|
||||
}
|
||||
else if (progressHtml) {
|
||||
|
@ -1081,7 +1117,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
var outerCardFooter = '';
|
||||
if (!overlayText && !footerOverlayed) {
|
||||
footerCssClass = options.cardLayout ? 'cardFooter visualCardBox-cardFooter' : 'cardFooter transparent';
|
||||
outerCardFooter = getCardFooterText(item, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, true);
|
||||
outerCardFooter = getCardFooterText(item, apiClient, options, showTitle, forceName, overlayText, imgUrl, footerCssClass, progressHtml, true);
|
||||
}
|
||||
|
||||
if (outerCardFooter && !options.cardLayout && options.allowBottomPadding !== false) {
|
||||
|
|
|
@ -383,3 +383,22 @@
|
|||
.timerIcon, .seriesTimerIcon {
|
||||
color: #cc3333 !important;
|
||||
}
|
||||
|
||||
.visibleGuideScroller::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.visibleGuideScroller::-webkit-scrollbar-button:start:decrement,
|
||||
.visibleGuideScroller::-webkit-scrollbar-button:end:increment {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.visibleGuideScroller::-webkit-scrollbar-track-piece {
|
||||
background-color: #3b3b3b;
|
||||
}
|
||||
|
||||
.visibleGuideScroller::-webkit-scrollbar-thumb:vertical, .visibleGuideScroller::-webkit-scrollbar-thumb:horizontal {
|
||||
-webkit-border-radius: 2px;
|
||||
background: #888 no-repeat center;
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<div class="channelTimeslotHeader">
|
||||
<button class="btnSelectDate clearButton" style="display:block;"></button>
|
||||
</div>
|
||||
<div class="timeslotHeaders smoothScrollX" style="scroll-behavior: auto;"></div>
|
||||
<div class="timeslotHeaders smoothScrollX visibleGuideScroller" style="scroll-behavior: auto;"></div>
|
||||
</div>
|
||||
|
||||
<div class="smoothScrollY guideVerticalScroller programContainer" style="flex-grow: 1;">
|
||||
<div class="smoothScrollY guideVerticalScroller programContainer visibleGuideScroller" style="flex-grow: 1;">
|
||||
<div class="channelList"></div>
|
||||
|
||||
<div class="programGridContainer programGrid smoothScrollX" style="white-space: nowrap;">
|
||||
<div class="programGridContainer programGrid smoothScrollX visibleGuideScroller" style="white-space: nowrap;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -43,24 +43,6 @@
|
|||
contain: style;
|
||||
}
|
||||
|
||||
.textActionButton {
|
||||
border: 0 !important;
|
||||
background: transparent;
|
||||
border: 0 !important;
|
||||
padding: 0 !important;
|
||||
cursor: pointer;
|
||||
outline: none !important;
|
||||
color: inherit;
|
||||
vertical-align: middle;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.textActionButton:hover {
|
||||
text-decoration: underline;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.pageWithAbsoluteTabs .pageTabContent, .libraryPage > .ui-content {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,12 @@
|
|||
$('#fldEnableAutomaticRestart', page).hide();
|
||||
}
|
||||
|
||||
if (systemInfo.CanSelfRestart || systemInfo.CanSelfUpdate) {
|
||||
$('.autoUpdatesContainer', page).removeClass('hide');
|
||||
} else {
|
||||
$('.autoUpdatesContainer', page).addClass('hide');
|
||||
}
|
||||
|
||||
$('#chkEnableDashboardResponseCache', page).checked(config.EnableDashboardResponseCaching);
|
||||
$('#chkEnableMinification', page).checked(config.EnableDashboardResourceMinification);
|
||||
$('#txtDashboardSourcePath', page).val(config.DashboardSourcePath).trigger('change');
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div is="emby-collapse" title="${HeaderAutomaticUpdates}">
|
||||
<div is="emby-collapse" title="${HeaderAutomaticUpdates}" class="autoUpdatesContainer hide">
|
||||
<div class="collapseContent">
|
||||
<br />
|
||||
<label class="fldAutomaticUpdates checkboxContainer">
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<div id="liveTvRecordingListPage" data-role="page" class="page libraryPage liveTvPage noSecondaryNavPage" data-title="${HeaderLiveTv}" data-require="scripts/livetvrecordinglist,livetvcss" data-menubutton="false">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="viewSettings" style="margin:.5em 0;">
|
||||
|
||||
<h1 class="listName" style="margin: 0 1em 0 0; display: inline-block; vertical-align: middle;"></h1>
|
||||
|
||||
<div class="viewControls">
|
||||
</div>
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
</div>
|
||||
<div is="emby-itemscontainer" id="items" class="itemsContainer vertical-wrap centered"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -638,13 +638,6 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (browser.edge || browser.msie) {
|
||||
fetchSubtitles(track).then(function (data) {
|
||||
currentTrackEvents = data.TrackEvents;
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var trackElement = null;
|
||||
var expectedId = 'manualTrack' + track.index;
|
||||
|
||||
|
|
|
@ -47,12 +47,13 @@
|
|||
html = cardBuilder.getCardsHtml({
|
||||
items: result.Items,
|
||||
shape: query.IsMovie ? 'portrait' : "backdrop",
|
||||
preferThumb: !query.IsMovie,
|
||||
context: 'livetv',
|
||||
centerText: true,
|
||||
lazy: true,
|
||||
overlayText: false,
|
||||
showTitle: true,
|
||||
showParentTitle: query.IsSeries !== false && !query.IsMovie,
|
||||
//showParentTitle: query.IsSeries !== false && !query.IsMovie,
|
||||
showProgramAirInfo: params.type != 'Recordings',
|
||||
overlayMoreButton: true,
|
||||
showYear: query.IsMovie && params.type == 'Recordings'
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
define(['jQuery', 'cardBuilder', 'dom'], function ($, cardBuilder, dom) {
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
StartIndex: 0,
|
||||
Fields: "CanDelete,PrimaryImageAspectRatio"
|
||||
};
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getLiveTvRecordings(query).then(function (result) {
|
||||
|
||||
// Scroll back up so they can see the results from the beginning
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getQueryPagingHtml({
|
||||
startIndex: query.StartIndex,
|
||||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
showLimit: false,
|
||||
updatePageSizeSetting: false
|
||||
}));
|
||||
|
||||
updateFilterControls();
|
||||
|
||||
var screenWidth = dom.getWindowSize().innerWidth;
|
||||
|
||||
html += cardBuilder.getCardsHtml({
|
||||
|
||||
items: result.Items,
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
overlayText: screenWidth >= 600,
|
||||
coverImage: true
|
||||
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getQueryPagingHtml({
|
||||
startIndex: query.StartIndex,
|
||||
limit: query.Limit,
|
||||
totalRecordCount: result.TotalRecordCount,
|
||||
showLimit: false,
|
||||
updatePageSizeSetting: false
|
||||
});
|
||||
|
||||
var elem = page.querySelector('#items');
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
if (getParameterByName('savequery') != 'false') {
|
||||
LibraryBrowser.saveQueryValues('episodes', query);
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#liveTvRecordingListPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
||||
}).on('pagebeforeshow', "#liveTvRecordingListPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
LibraryBrowser.loadSavedQueryValues('episodes', query);
|
||||
|
||||
var groupId = getParameterByName('groupid');
|
||||
query.GroupId = groupId;
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
if (query.GroupId) {
|
||||
|
||||
ApiClient.getLiveTvRecordingGroup(query.GroupId).then(function (group) {
|
||||
$('.listName', page).html(group.Name);
|
||||
});
|
||||
|
||||
} else {
|
||||
$('.listName', page).html(Globalize.translate('HeaderAllRecordings'));
|
||||
}
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
});
|
|
@ -24,7 +24,8 @@
|
|||
limit: getLimit() * 2,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary",
|
||||
EnableTotalRecordCount: false
|
||||
EnableTotalRecordCount: false,
|
||||
Fields: "ChannelInfo"
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
|
@ -47,7 +48,8 @@
|
|||
IsSports: false,
|
||||
IsKids: false,
|
||||
IsSeries: true,
|
||||
EnableTotalRecordCount: false
|
||||
EnableTotalRecordCount: false,
|
||||
Fields: "ChannelInfo"
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
|
@ -61,7 +63,8 @@
|
|||
HasAired: false,
|
||||
limit: getLimit(),
|
||||
IsMovie: true,
|
||||
EnableTotalRecordCount: false
|
||||
EnableTotalRecordCount: false,
|
||||
Fields: "ChannelInfo"
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
|
@ -75,7 +78,8 @@
|
|||
HasAired: false,
|
||||
limit: getLimit(),
|
||||
IsSports: true,
|
||||
EnableTotalRecordCount: false
|
||||
EnableTotalRecordCount: false,
|
||||
Fields: "ChannelInfo"
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
|
@ -89,7 +93,8 @@
|
|||
HasAired: false,
|
||||
limit: getLimit(),
|
||||
IsKids: true,
|
||||
EnableTotalRecordCount: false
|
||||
EnableTotalRecordCount: false,
|
||||
Fields: "ChannelInfo"
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
|
@ -101,6 +106,7 @@
|
|||
|
||||
var html = cardBuilder.getCardsHtml({
|
||||
items: items,
|
||||
preferThumb: !shape,
|
||||
shape: shape || (enableScrollX() ? 'overflowBackdrop' : 'backdrop'),
|
||||
showTitle: true,
|
||||
centerText: true,
|
||||
|
@ -111,6 +117,7 @@
|
|||
overlayPlayButton: overlayButton == 'play',
|
||||
allowBottomPadding: !enableScrollX(),
|
||||
showProgramAirInfo: true
|
||||
//cardFooterAside: 'logo'
|
||||
});
|
||||
|
||||
var elem = page.querySelector('.' + sectionClass);
|
||||
|
|
|
@ -455,6 +455,7 @@
|
|||
shape: scrollX ? 'overflowBackdrop' : shape,
|
||||
showTitle: showTitles,
|
||||
centerText: true,
|
||||
overlayText: false,
|
||||
lazy: true,
|
||||
autoThumb: true,
|
||||
transition: false,
|
||||
|
|
|
@ -2141,12 +2141,6 @@ var AppInfo = {};
|
|||
controller: 'scripts/livetvitems'
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/livetvrecordinglist.html',
|
||||
dependencies: [],
|
||||
autoFocus: false
|
||||
});
|
||||
|
||||
defineRoute({
|
||||
path: '/livetvseriestimer.html',
|
||||
dependencies: ['emby-checkbox', 'emby-input', 'emby-button', 'emby-collapse', 'scripts/livetvcomponents', 'scripts/livetvseriestimer', 'livetvcss'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue