mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #689 - Support grouping latest items
This commit is contained in:
parent
eeafc46d94
commit
46f9a6a331
28 changed files with 382 additions and 144 deletions
|
@ -3,30 +3,28 @@
|
|||
$(document).on('pagebeforeshow', "#moviesLatestPage", function () {
|
||||
|
||||
var parentId = LibraryMenu.getTopParentId();
|
||||
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
var screenWidth = $(window).width();
|
||||
|
||||
var page = this;
|
||||
|
||||
var options = {
|
||||
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Movie",
|
||||
Limit: screenWidth >= 1920 ? 32 : (screenWidth >= 1440 ? 32 : (screenWidth >= 800 ? 28 : 18)),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsUnplayed",
|
||||
CollapseBoxSetItems: false,
|
||||
ParentId: parentId
|
||||
ParentId: parentId,
|
||||
IsPlayed: false
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
|
||||
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items
|
||||
items: items,
|
||||
lazy: true
|
||||
|
||||
})).createPosterItemMenus();
|
||||
})).trigger('create').createPosterItemMenus();
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue