1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/musicrecommended.js

50 lines
1.3 KiB
JavaScript
Raw Normal View History

2013-04-25 19:28:01 -04:00
(function ($, document) {
$(document).on('pagebeforeshow', "#musicRecommendedPage", function () {
var page = this;
var options = {
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "MusicAlbum",
Limit: 5,
Recursive: true,
Fields: "PrimaryImageAspectRatio"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('#recentlyAddedAlbums', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
useAverageAspectRatio: true,
showNewIndicator: false
}));
});
options = {
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Audio",
Limit: 5,
Recursive: true,
Fields: "PrimaryImageAspectRatio"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
$('#recentlyAddedSongs', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
useAverageAspectRatio: true,
showNewIndicator: false
}));
});
});
})(jQuery, document);