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();
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 = {
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Episode",
Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1440 ? 16 : 15),
Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
Filters: "IsUnplayed",
2014-05-01 19:54:33 -07:00
ExcludeLocationTypes: "Virtual",
ParentId: parentId
2014-02-22 22:52:30 -07:00
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "backdrop",
showTitle: true,
showParentTitle: true,
overlayText: true
})).createPosterItemMenus();
2014-02-22 22:52:30 -07:00
});
});
})(jQuery, document);