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

35 lines
963 B
JavaScript
Raw Normal View History

(function ($, document) {
$(document).on('pagebeforeshow', "#moviesLatestPage", function () {
2014-05-01 19:54:33 -07:00
var parentId = LibraryMenu.getTopParentId();
var screenWidth = $(window).width();
var page = this;
var options = {
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Movie",
2014-05-01 19:54:33 -07:00
Limit: screenWidth >= 1920 ? 32 : (screenWidth >= 1440 ? 32 : (screenWidth >= 800 ? 24 : 18)),
Recursive: true,
Fields: "PrimaryImageAspectRatio",
2014-04-26 20:42:05 -07:00
Filters: "IsUnplayed",
2014-05-01 19:54:33 -07:00
CollapseBoxSetItems: false,
ParentId: parentId
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
2014-04-03 15:50:04 -07:00
items: result.Items
})).createPosterItemMenus();
});
});
})(jQuery, document);