mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #839 - Support getting latest channel items
This commit is contained in:
parent
77b267a916
commit
4beb349afe
17 changed files with 239 additions and 19 deletions
|
@ -7,6 +7,7 @@
|
||||||
<div id="channelsPage" data-role="page" class="page libraryPage channelsPage" data-theme="b" data-contextname="${HeaderChannels}">
|
<div id="channelsPage" data-role="page" class="page libraryPage channelsPage" data-theme="b" data-contextname="${HeaderChannels}">
|
||||||
|
|
||||||
<div class="libraryViewNav scopedLibraryViewNav">
|
<div class="libraryViewNav scopedLibraryViewNav">
|
||||||
|
<a href="channelslatest.html">${TabLatest}</a>
|
||||||
<a href="#" class="ui-btn-active">${TabChannels}</a>
|
<a href="#" class="ui-btn-active">${TabChannels}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
21
dashboard-ui/channelslatest.html
Normal file
21
dashboard-ui/channelslatest.html
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>${TitleMediaBrowser}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="channelsLatestPage" data-role="page" class="page libraryPage channelsPage" data-theme="b" data-contextname="${HeaderChannels}">
|
||||||
|
|
||||||
|
<div class="libraryViewNav scopedLibraryViewNav">
|
||||||
|
<a href="#" class="ui-btn-active">${TabLatest}</a>
|
||||||
|
<a href="channels.html">${TabChannels}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div data-role="content">
|
||||||
|
<div class="viewSettings">
|
||||||
|
</div>
|
||||||
|
<div id="items" class="itemsContainer"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -46,10 +46,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.listHeader {
|
.listHeader {
|
||||||
margin-top: .7em;
|
margin-top: .5em;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
}
|
}
|
||||||
|
.firstListHeader {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.ehsContent {
|
.ehsContent {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -69,7 +72,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.homePageSection + .homePageSection {
|
.homePageSection + .homePageSection {
|
||||||
margin-top: 2em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 1000px) {
|
@media all and (min-width: 1000px) {
|
||||||
|
|
|
@ -122,8 +122,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 51px;
|
top: 51px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
background-color: #181818;
|
background-color: #161616;
|
||||||
background-color: rgba(24, 24, 24, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 460px) {
|
@media all and (max-width: 460px) {
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<select id="selectHomeSection1" data-mini="true">
|
<select id="selectHomeSection1" data-mini="true">
|
||||||
<option value="">${OptionAuto}</option>
|
<option value="">${OptionAuto}</option>
|
||||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="librarytiles">${OptionMyLibrary}</option>
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
<select id="selectHomeSection2" data-mini="true">
|
<select id="selectHomeSection2" data-mini="true">
|
||||||
<option value="">${OptionAuto}</option>
|
<option value="">${OptionAuto}</option>
|
||||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="librarytiles">${OptionMyLibrary}</option>
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
||||||
|
@ -52,6 +54,21 @@
|
||||||
<select id="selectHomeSection3" data-mini="true">
|
<select id="selectHomeSection3" data-mini="true">
|
||||||
<option value="">${OptionAuto}</option>
|
<option value="">${OptionAuto}</option>
|
||||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
|
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
||||||
|
<option value="folders">${OptionLibraryFolders}</option>
|
||||||
|
<option value="resume">${OptionResumablemedia}</option>
|
||||||
|
<option value="none">${OptionNone}</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="selectHomeSection4">${LabelHomePageSection4}</label>
|
||||||
|
<select id="selectHomeSection4" data-mini="true">
|
||||||
|
<option value="">${OptionAuto}</option>
|
||||||
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="librarytiles">${OptionMyLibrary}</option>
|
<option value="librarytiles">${OptionMyLibrary}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
<option value="smalllibrarytiles">${OptionMyLibrarySmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
<option value="librarybuttons">${OptionMyLibraryButtons}</option>
|
||||||
|
|
|
@ -98,6 +98,11 @@
|
||||||
if ($.browser.msie) {
|
if ($.browser.msie) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For bandwidth
|
||||||
|
if ($.browser.mobile) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var userId = Dashboard.getCurrentUserId();
|
var userId = Dashboard.getCurrentUserId();
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var downloadableList = allChannelFeatures.filter(function (i) {
|
var downloadableList = allChannelFeatures.filter(function (i) {
|
||||||
return i.CanDownloadAllMedia;
|
return i.SupportsContentDownloading;
|
||||||
});
|
});
|
||||||
|
|
||||||
populateDownloadList(page, config, downloadableList);
|
populateDownloadList(page, config, downloadableList);
|
||||||
|
|
40
dashboard-ui/scripts/channelslatest.js
Normal file
40
dashboard-ui/scripts/channelslatest.js
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
(function ($, document) {
|
||||||
|
|
||||||
|
function reloadItems(page) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
|
||||||
|
Limit: 30,
|
||||||
|
Fields: "PrimaryImageAspectRatio",
|
||||||
|
Filters: "IsUnplayed",
|
||||||
|
UserId: Dashboard.getCurrentUserId()
|
||||||
|
};
|
||||||
|
|
||||||
|
$.getJSON(ApiClient.getUrl("Channels/Items/Latest", options)).done(function (result) {
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
html += LibraryBrowser.getPosterViewHtml({
|
||||||
|
items: result.Items,
|
||||||
|
shape: 'auto',
|
||||||
|
showTitle: true,
|
||||||
|
centerText: true,
|
||||||
|
context: 'channels',
|
||||||
|
lazy: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#items", page).html(html).trigger('create').createPosterItemMenus();
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('pagebeforeshow', "#channelsLatestPage", function () {
|
||||||
|
|
||||||
|
reloadItems(this);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
})(jQuery, document);
|
|
@ -108,6 +108,8 @@
|
||||||
return 'resume';
|
return 'resume';
|
||||||
case 2:
|
case 2:
|
||||||
return 'latestmedia';
|
return 'latestmedia';
|
||||||
|
case 3:
|
||||||
|
return 'latestchannelmedia';
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -147,7 +149,7 @@
|
||||||
|
|
||||||
SortBy: "DateCreated",
|
SortBy: "DateCreated",
|
||||||
SortOrder: "Descending",
|
SortOrder: "Descending",
|
||||||
Limit: screenWidth >= 2400 ? 30 : (screenWidth >= 1920 ? 20 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 12 : 8))),
|
Limit: screenWidth >= 2400 ? 30 : (screenWidth >= 1920 ? 20 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 9 : 8))),
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "PrimaryImageAspectRatio",
|
Fields: "PrimaryImageAspectRatio",
|
||||||
Filters: "IsUnplayed,IsNotFolder",
|
Filters: "IsUnplayed,IsNotFolder",
|
||||||
|
@ -179,6 +181,41 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadLatestChannelMedia(elem, userId) {
|
||||||
|
|
||||||
|
var screenWidth = $(window).width();
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
|
||||||
|
Limit: 6,
|
||||||
|
Fields: "PrimaryImageAspectRatio",
|
||||||
|
Filters: "IsUnplayed",
|
||||||
|
UserId: userId
|
||||||
|
};
|
||||||
|
|
||||||
|
$.getJSON(ApiClient.getUrl("Channels/Items/Latest", options)).done(function (result) {
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
if (result.Items.length) {
|
||||||
|
html += '<h1 class="listHeader">' + Globalize.translate('HeaderLatestChannelMedia') + '</h1>';
|
||||||
|
html += '<div>';
|
||||||
|
html += LibraryBrowser.getPosterViewHtml({
|
||||||
|
items: result.Items,
|
||||||
|
preferThumb: true,
|
||||||
|
shape: 'auto',
|
||||||
|
showTitle: true,
|
||||||
|
centerText: true,
|
||||||
|
context: 'home',
|
||||||
|
lazy: true
|
||||||
|
});
|
||||||
|
html += '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$(elem).html(html).trigger('create').createPosterItemMenus();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function loadLibraryTiles(elem, userId, shape, index) {
|
function loadLibraryTiles(elem, userId, shape, index) {
|
||||||
|
|
||||||
getUserViews(userId).done(function (items) {
|
getUserViews(userId).done(function (items) {
|
||||||
|
@ -289,7 +326,7 @@
|
||||||
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
|
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
|
||||||
|
|
||||||
var elem = $('.section' + index, page);
|
var elem = $('.section' + index, page);
|
||||||
|
|
||||||
if (section == 'latestmedia') {
|
if (section == 'latestmedia') {
|
||||||
loadRecentlyAdded(elem, userId);
|
loadRecentlyAdded(elem, userId);
|
||||||
}
|
}
|
||||||
|
@ -308,6 +345,9 @@
|
||||||
} else if (section == 'folders') {
|
} else if (section == 'folders') {
|
||||||
loadLibraryFolders(elem, userId, 'backdrop', index);
|
loadLibraryFolders(elem, userId, 'backdrop', index);
|
||||||
|
|
||||||
|
} else if (section == 'latestchannelmedia') {
|
||||||
|
loadLatestChannelMedia(elem, userId);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
elem.empty();
|
elem.empty();
|
||||||
|
@ -317,7 +357,7 @@
|
||||||
function loadSections(page, userId, displayPreferences) {
|
function loadSections(page, userId, displayPreferences) {
|
||||||
|
|
||||||
var i, length;
|
var i, length;
|
||||||
var sectionCount = 3;
|
var sectionCount = 4;
|
||||||
|
|
||||||
var elem = $('.sections', page);
|
var elem = $('.sections', page);
|
||||||
|
|
||||||
|
|
|
@ -370,7 +370,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.CollectionType == 'channels') {
|
if (item.CollectionType == 'channels') {
|
||||||
return 'channels.html';
|
return 'channelslatest.html';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.CollectionType == 'movies') {
|
if (item.CollectionType == 'movies') {
|
||||||
|
|
|
@ -235,6 +235,10 @@
|
||||||
|
|
||||||
self.updateTextStreamUrls = function (startPositionTicks) {
|
self.updateTextStreamUrls = function (startPositionTicks) {
|
||||||
|
|
||||||
|
if (!self.supportsTextTracks()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('track', video).each(function () {
|
$('track', video).each(function () {
|
||||||
|
|
||||||
var currentSrc = this.src;
|
var currentSrc = this.src;
|
||||||
|
@ -242,6 +246,7 @@
|
||||||
currentSrc = replaceQueryString(currentSrc, 'startPositionTicks', startPositionTicks);
|
currentSrc = replaceQueryString(currentSrc, 'startPositionTicks', startPositionTicks);
|
||||||
|
|
||||||
this.src = currentSrc;
|
this.src = currentSrc;
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -232,11 +232,12 @@
|
||||||
|
|
||||||
self.supportsTextTracks = function () {
|
self.supportsTextTracks = function () {
|
||||||
|
|
||||||
// Does not support changing tracks via mode property
|
// When seeking with transcoding, there repointing the track element
|
||||||
if ($.browser.mozilla) {
|
// to a new url (via src) doesn't seem to work.
|
||||||
|
if ($.browser.chrome) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportsTextTracks == null) {
|
if (supportsTextTracks == null) {
|
||||||
|
|
||||||
supportsTextTracks = document.createElement('video').textTracks != null;
|
supportsTextTracks = document.createElement('video').textTracks != null;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
$('#selectHomeSection1', page).val(displayPreferences.CustomPrefs.home0 || '').selectmenu("refresh");
|
$('#selectHomeSection1', page).val(displayPreferences.CustomPrefs.home0 || '').selectmenu("refresh");
|
||||||
$('#selectHomeSection2', page).val(displayPreferences.CustomPrefs.home1 || '').selectmenu("refresh");
|
$('#selectHomeSection2', page).val(displayPreferences.CustomPrefs.home1 || '').selectmenu("refresh");
|
||||||
$('#selectHomeSection3', page).val(displayPreferences.CustomPrefs.home2 || '').selectmenu("refresh");
|
$('#selectHomeSection3', page).val(displayPreferences.CustomPrefs.home2 || '').selectmenu("refresh");
|
||||||
|
$('#selectHomeSection4', page).val(displayPreferences.CustomPrefs.home3 || '').selectmenu("refresh");
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
displayPreferences.CustomPrefs.home0 = $('#selectHomeSection1', page).val();
|
displayPreferences.CustomPrefs.home0 = $('#selectHomeSection1', page).val();
|
||||||
displayPreferences.CustomPrefs.home1 = $('#selectHomeSection2', page).val();
|
displayPreferences.CustomPrefs.home1 = $('#selectHomeSection2', page).val();
|
||||||
displayPreferences.CustomPrefs.home2 = $('#selectHomeSection3', page).val();
|
displayPreferences.CustomPrefs.home2 = $('#selectHomeSection3', page).val();
|
||||||
|
displayPreferences.CustomPrefs.home3 = $('#selectHomeSection4', page).val();
|
||||||
|
|
||||||
ApiClient.updateDisplayPreferences('home', displayPreferences, userId, 'webclient').done(function () {
|
ApiClient.updateDisplayPreferences('home', displayPreferences, userId, 'webclient').done(function () {
|
||||||
|
|
||||||
|
|
|
@ -413,6 +413,7 @@
|
||||||
var playerInfo = MediaController.getPlayerInfo();
|
var playerInfo = MediaController.getPlayerInfo();
|
||||||
|
|
||||||
var supportedCommands = playerInfo.supportedCommands;
|
var supportedCommands = playerInfo.supportedCommands;
|
||||||
|
var playState = state.PlayState || {};
|
||||||
|
|
||||||
$('.btnToggleFullscreen', page).buttonEnabled(item && item.MediaType == 'Video' && supportedCommands.indexOf('ToggleFullscreen') != -1);
|
$('.btnToggleFullscreen', page).buttonEnabled(item && item.MediaType == 'Video' && supportedCommands.indexOf('ToggleFullscreen') != -1);
|
||||||
|
|
||||||
|
@ -437,8 +438,6 @@
|
||||||
var btnPause = $('.btnPause', page).buttonEnabled(item != null);
|
var btnPause = $('.btnPause', page).buttonEnabled(item != null);
|
||||||
var btnPlay = $('.btnPlay', page).buttonEnabled(item != null);
|
var btnPlay = $('.btnPlay', page).buttonEnabled(item != null);
|
||||||
|
|
||||||
var playState = state.PlayState || {};
|
|
||||||
|
|
||||||
if (playState.IsPaused) {
|
if (playState.IsPaused) {
|
||||||
|
|
||||||
hideButton(btnPause);
|
hideButton(btnPause);
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
(function ($, document) {
|
(function ($, document) {
|
||||||
|
|
||||||
function loadNextUp(page) {
|
function reload(page) {
|
||||||
|
|
||||||
var screenWidth = $(window).width();
|
|
||||||
|
|
||||||
var query = {
|
var query = {
|
||||||
|
|
||||||
|
@ -18,10 +16,47 @@
|
||||||
|
|
||||||
$('.scopedLibraryViewNav', page).show();
|
$('.scopedLibraryViewNav', page).show();
|
||||||
$('.globalNav', page).hide();
|
$('.globalNav', page).hide();
|
||||||
|
$('.homeEhsContent', page).css('text-align', 'left');
|
||||||
|
$('.scopedContent', page).show();
|
||||||
|
|
||||||
|
loadResume(page);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.scopedLibraryViewNav', page).hide();
|
$('.scopedLibraryViewNav', page).hide();
|
||||||
$('.globalNav', page).show();
|
$('.globalNav', page).show();
|
||||||
|
$('.homeEhsContent', page).css('text-align', 'center');
|
||||||
|
$('.scopedContent', page).hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
loadNextUp(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadNextUp(page) {
|
||||||
|
|
||||||
|
var screenWidth = $(window).width();
|
||||||
|
|
||||||
|
var query = {
|
||||||
|
|
||||||
|
Limit: 24,
|
||||||
|
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated",
|
||||||
|
UserId: Dashboard.getCurrentUserId(),
|
||||||
|
ExcludeLocationTypes: "Virtual"
|
||||||
|
};
|
||||||
|
|
||||||
|
query.ParentId = LibraryMenu.getTopParentId();
|
||||||
|
|
||||||
|
if (query.ParentId) {
|
||||||
|
|
||||||
|
$('.scopedLibraryViewNav', page).show();
|
||||||
|
$('.globalNav', page).hide();
|
||||||
|
$('.ehsContent', page).css('text-align', 'left').removeClass('homeEhsContent');
|
||||||
|
$('.scopedContent', page).show();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$('.scopedLibraryViewNav', page).hide();
|
||||||
|
$('.globalNav', page).show();
|
||||||
|
$('.ehsContent', page).css('text-align', 'center').addClass('homeEhsContent');
|
||||||
|
$('.scopedContent', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiClient.getNextUpEpisodes(query).done(function (result) {
|
ApiClient.getNextUpEpisodes(query).done(function (result) {
|
||||||
|
@ -46,11 +81,50 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadResume(page) {
|
||||||
|
|
||||||
|
var screenWidth = $(window).width();
|
||||||
|
|
||||||
|
var parentId = LibraryMenu.getTopParentId();
|
||||||
|
|
||||||
|
var options = {
|
||||||
|
|
||||||
|
SortBy: "DatePlayed",
|
||||||
|
SortOrder: "Descending",
|
||||||
|
IncludeItemTypes: "Episode",
|
||||||
|
Filters: "IsResumable",
|
||||||
|
Limit: screenWidth >= 1920 ? 5 : 4,
|
||||||
|
Recursive: true,
|
||||||
|
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
||||||
|
ExcludeLocationTypes: "Virtual",
|
||||||
|
ParentId: parentId
|
||||||
|
};
|
||||||
|
|
||||||
|
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||||
|
|
||||||
|
if (result.Items.length) {
|
||||||
|
$('#resumableSection', page).show();
|
||||||
|
} else {
|
||||||
|
$('#resumableSection', page).hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||||
|
items: result.Items,
|
||||||
|
shape: "backdrop",
|
||||||
|
showTitle: true,
|
||||||
|
showParentTitle: true,
|
||||||
|
overlayText: screenWidth >= 600
|
||||||
|
|
||||||
|
})).createPosterItemMenus();
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$(document).on('pagebeforeshow', "#tvRecommendedPage", function () {
|
$(document).on('pagebeforeshow', "#tvRecommendedPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
loadNextUp(page);
|
reload(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3419,6 +3419,8 @@ MediaBrowser.SHA1 = function (msg) {
|
||||||
} else if (browser.webkit) {
|
} else if (browser.webkit) {
|
||||||
browser.safari = true;
|
browser.safari = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
browser.mobile = (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
|
||||||
|
|
||||||
jQuery.browser = browser;
|
jQuery.browser = browser;
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,21 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<table class="ehsContent homeEhsContent" style="text-align: center;">
|
<table class="ehsContent">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
|
<div class="scopedContent">
|
||||||
|
<div id="resumableSection" style="display: none;">
|
||||||
|
<h1 class="listHeader firstListHeader">${HeaderResume}</h1>
|
||||||
|
|
||||||
|
<div id="resumableItems">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="listHeader">${HeaderNextUp}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="nextUpItems">
|
<div id="nextUpItems">
|
||||||
</div>
|
</div>
|
||||||
<p class="noNextUpItems" style="display: none;">${NoNextUpItemsMessage}</p>
|
<p class="noNextUpItems" style="display: none;">${NoNextUpItemsMessage}</p>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue