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

@ -3,24 +3,22 @@
$(document).on('pagebeforeshow', "#gamesRecommendedPage", function () {
var parentId = LibraryMenu.getTopParentId();
var userId = Dashboard.getCurrentUserId();
var page = this;
var options = {
SortBy: "DateCreated",
SortOrder: "Descending",
MediaTypes: "Game",
IncludeItemTypes: "Game",
Limit: 8,
Recursive: true,
Fields: "ItemCounts,AudioInfo,PrimaryImageAspectRatio",
Fields: "PrimaryImageAspectRatio",
ParentId: parentId
};
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,
transparent: true,
borderless: true,
shape: 'auto',
@ -42,7 +40,7 @@
ParentId: parentId
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
ApiClient.getItems(userId, options).done(function (result) {
if (result.Items.length) {
$('#recentlyPlayedSection', page).show();