1
0
Fork 0
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:
Luke Pulverenti 2014-07-05 01:21:13 -04:00
parent eeafc46d94
commit 46f9a6a331
28 changed files with 382 additions and 144 deletions

View file

@ -126,33 +126,29 @@
function loadRecentlyAdded(elem, userId) {
var screenWidth = $(window).width();
var options = {
SortBy: "DateCreated",
SortOrder: "Descending",
Limit: screenWidth >= 2400 ? 30 : (screenWidth >= 1920 ? 15 : (screenWidth >= 1440 ? 10 : (screenWidth >= 800 ? 9 : 8))),
Recursive: true,
Fields: "PrimaryImageAspectRatio",
Filters: "IsUnplayed,IsNotFolder",
CollapseBoxSetItems: false,
ExcludeLocationTypes: "Virtual,Remote"
IsPlayed: false,
IsFolder: false
};
ApiClient.getItems(userId, options).done(function (result) {
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
var html = '';
if (result.Items.length) {
if (items.length) {
html += '<h1 class="listHeader">' + Globalize.translate('HeaderLatestMedia') + '</h1>';
html += '<div>';
html += LibraryBrowser.getPosterViewHtml({
items: result.Items,
items: items,
preferThumb: true,
shape: 'backdrop',
showTitle: true,
centerText: true,
context: 'home',
showUnplayedIndicator: false,
showChildCountIndicator: true,
lazy: true
});
html += '</div>';