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,27 +3,25 @@
$(document).on('pagebeforeshow', "#musicRecommendedPage", function () {
var screenWidth = $(window).width();
var userId = Dashboard.getCurrentUserId();
var page = this;
var parentId = LibraryMenu.getTopParentId();
var options = {
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "MusicAlbum",
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 6),
Recursive: true,
Fields: "PrimaryImageAspectRatio",
ParentId: parentId
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#recentlyAddedAlbums', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
items: items,
showUnplayedIndicator: false,
showChildCountIndicator: true,
shape: "square",
showTitle: true,
showParentTitle: true
@ -32,21 +30,18 @@
});
options = {
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Audio",
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1440 ? 8 : 6),
Recursive: true,
Fields: "PrimaryImageAspectRatio,AudioInfo",
Fields: "PrimaryImageAspectRatio",
ParentId: parentId
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
$('#recentlyAddedSongs', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
items: items,
showUnplayedIndicator: false,
showChildCountIndicator: true,
shape: "square",
showTitle: true,
showParentTitle: true