mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
35 lines
1000 B
JavaScript
35 lines
1000 B
JavaScript
(function ($, document) {
|
|
|
|
$(document).on('pagebeforeshow', "#moviesLatestPage", function () {
|
|
|
|
var parentId = LibraryMenu.getTopParentId();
|
|
var userId = Dashboard.getCurrentUserId();
|
|
|
|
var page = this;
|
|
|
|
var options = {
|
|
|
|
IncludeItemTypes: "Movie",
|
|
Limit: 30,
|
|
Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo",
|
|
ParentId: parentId,
|
|
IsPlayed: false,
|
|
ImageTypeLimit: 1,
|
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
|
};
|
|
|
|
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
|
|
|
|
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
|
items: items,
|
|
lazy: true,
|
|
shape: 'homePagePortrait',
|
|
overlayText: false
|
|
|
|
})).trigger('create').createCardMenus();
|
|
});
|
|
|
|
});
|
|
|
|
|
|
})(jQuery, document); |