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,
|
2013-04-28 11:30:58 -07:00
|
|
|
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,
|
2013-04-28 11:30:58 -07:00
|
|
|
useAverageAspectRatio: true,
|
|
|
|
transparent: true
|
2013-04-14 20:37:07 -07:00
|
|
|
}));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})(jQuery, document);
|