1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/movieslatest.js

35 lines
1,000 B
JavaScript
Raw Normal View History

(function ($, document) {
$(document).on('pagebeforeshow', "#moviesLatestPage", function () {
2014-05-01 22:54:33 -04:00
var parentId = LibraryMenu.getTopParentId();
var userId = Dashboard.getCurrentUserId();
var page = this;
var options = {
IncludeItemTypes: "Movie",
2014-12-01 07:43:34 -05:00
Limit: 30,
2014-12-11 01:20:28 -05:00
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
ParentId: parentId,
2014-11-30 14:01:33 -05:00
IsPlayed: false,
ImageTypeLimit: 1,
2014-12-01 07:43:34 -05: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 22:34:45 -04:00
lazy: true,
shape: 'homePagePortrait',
2014-12-04 00:24:41 -05:00
overlayText: false
2014-08-01 22:34:45 -04:00
})).trigger('create').createCardMenus();
});
});
})(jQuery, document);