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,6 +3,7 @@
|
|||
$(document).on('pagebeforeshow', "#tvNextUpPage", function () {
|
||||
|
||||
var screenWidth = $(window).width();
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
var parentId = LibraryMenu.getTopParentId();
|
||||
|
||||
|
@ -10,30 +11,29 @@
|
|||
|
||||
var options = {
|
||||
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1440 ? 16 : 15),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
||||
Filters: "IsUnplayed",
|
||||
ExcludeLocationTypes: "Virtual",
|
||||
ParentId: parentId
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
ParentId: parentId,
|
||||
IsPlayed: false
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
|
||||
|
||||
$('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
items: items,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
preferThumb: true,
|
||||
inheritThumb: false,
|
||||
showParentTitle: true,
|
||||
overlayText: screenWidth >= 600
|
||||
showUnplayedIndicator: false,
|
||||
showChildCountIndicator: true,
|
||||
overlayText: screenWidth >= 600,
|
||||
lazy: true
|
||||
|
||||
})).createPosterItemMenus();
|
||||
})).trigger('create').createPosterItemMenus();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue