add chapter image error handling

This commit is contained in:
Luke Pulverenti 2016-09-05 16:07:36 -04:00
parent 638fe11131
commit 3a5dad0e64
14 changed files with 123 additions and 190 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -455,6 +455,7 @@
shape: scrollX ? 'overflowBackdrop' : shape,
showTitle: showTitles,
centerText: true,
overlayText: false,
lazy: true,
autoThumb: true,
transition: false,

View file

@ -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'],