mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
(function ($, document) {
|
|
|
|
$(document).on('pagebeforeshow', "#tvNextUpPage", function () {
|
|
|
|
var screenWidth = $(window).width();
|
|
var userId = Dashboard.getCurrentUserId();
|
|
|
|
var parentId = LibraryMenu.getTopParentId();
|
|
|
|
var page = this;
|
|
|
|
var options = {
|
|
|
|
IncludeItemTypes: "Episode",
|
|
Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1440 ? 16 : 15),
|
|
Fields: "PrimaryImageAspectRatio",
|
|
ParentId: parentId,
|
|
IsPlayed: false
|
|
};
|
|
|
|
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
|
|
|
|
$('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({
|
|
items: items,
|
|
shape: "backdrop",
|
|
preferThumb: true,
|
|
inheritThumb: false,
|
|
showParentTitle: false,
|
|
showUnplayedIndicator: false,
|
|
showChildCountIndicator: true,
|
|
overlayText: screenWidth >= 600,
|
|
lazy: true
|
|
|
|
})).trigger('create').createPosterItemMenus();
|
|
|
|
});
|
|
});
|
|
|
|
|
|
})(jQuery, document); |