jellyfin-web/dashboard-ui/scripts/tvlatest.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

2014-02-22 22:52:30 -07:00
(function ($, document) {
$(document).on('pagebeforeshow', "#tvNextUpPage", function () {
var screenWidth = $(window).width();
var userId = Dashboard.getCurrentUserId();
2014-02-22 22:52:30 -07:00
2014-05-01 19:54:33 -07:00
var parentId = LibraryMenu.getTopParentId();
2014-02-22 22:52:30 -07:00
var page = this;
var options = {
IncludeItemTypes: "Episode",
2014-11-24 17:13:12 -07:00
Limit: 24,
Fields: "PrimaryImageAspectRatio",
ParentId: parentId,
IsPlayed: false
2014-02-22 22:52:30 -07:00
};
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
2014-02-22 22:52:30 -07:00
$('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({
items: items,
2014-08-01 19:34:45 -07:00
shape: "homePageBackdrop",
preferThumb: true,
inheritThumb: false,
2014-07-15 12:16:16 -07:00
showParentTitle: false,
showUnplayedIndicator: false,
showChildCountIndicator: true,
overlayText: screenWidth >= 600,
lazy: true
2014-02-22 22:52:30 -07:00
2014-08-01 19:34:45 -07:00
})).trigger('create').createCardMenus();
2014-02-22 22:52:30 -07:00
});
});
})(jQuery, document);