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

35 lines
1000 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 userId = Dashboard.getCurrentUserId();
var page = this;
var options = {
IncludeItemTypes: "Movie",
2014-12-01 05:43:34 -07:00
Limit: 30,
2014-12-10 23:20:28 -07:00
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
ParentId: parentId,
2014-11-30 12:01:33 -07:00
IsPlayed: false,
ImageTypeLimit: 1,
2014-12-01 05:43:34 -07:00
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
};
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
items: items,
2014-08-01 19:34:45 -07:00
lazy: true,
shape: 'homePagePortrait',
2014-12-03 22:24:41 -07:00
overlayText: false
2014-08-01 19:34:45 -07:00
})).trigger('create').createCardMenus();
});
});
})(jQuery, document);