jellyfin-web/dashboard-ui/scripts/gamesrecommendedpage.js

52 lines
1.1 KiB
JavaScript
Raw Normal View History

2013-04-14 20:37:07 -07:00
(function ($, document) {
$(document).on('pagebeforeshow', "#gamesRecommendedPage", function () {
var page = this;
var options = {
SortBy: "DateCreated",
SortOrder: "Descending",
MediaTypes: "Game",
Limit: 5,
Recursive: true,
Fields: "PrimaryImageAspectRatio",
Filters: "IsUnplayed"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
2013-04-26 06:50:21 -07:00
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
useAverageAspectRatio: true,
showNewIndicator: false,
transparent: true
2013-04-14 20:37:07 -07:00
}));
});
2013-04-26 06:50:21 -07:00
options = {
2013-04-14 20:37:07 -07:00
SortBy: "DatePlayed",
SortOrder: "Descending",
MediaTypes: "Game",
Limit: 5,
Recursive: true,
Fields: "PrimaryImageAspectRatio",
Filters: "IsPlayed"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
2013-04-26 06:50:21 -07:00
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
useAverageAspectRatio: true,
transparent: true
2013-04-14 20:37:07 -07:00
}));
});
});
})(jQuery, document);