TV recommended page
This commit is contained in:
parent
7632a99a50
commit
b68c383af6
1 changed files with 56 additions and 1 deletions
|
@ -1 +1,56 @@
|
|||
|
||||
(function ($, document) {
|
||||
|
||||
$(document).on('pageshow', "#tvRecommendedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
var options = {
|
||||
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('#recentlyAddedItems', page).html(Dashboard.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
|
||||
options = {
|
||||
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Filters: "IsResumable",
|
||||
Limit: 5,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
if (result.Items.length) {
|
||||
$('#resumableSection', page).show();
|
||||
} else {
|
||||
$('#resumableSection', page).hide();
|
||||
}
|
||||
|
||||
$('#resumableItems', page).html(Dashboard.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue