2013-04-01 18:28:01 -07:00
|
|
|
|
(function ($, document) {
|
|
|
|
|
|
2013-04-30 20:28:26 -07:00
|
|
|
|
$(document).on('pagebeforeshow', "#tvRecommendedPage", function () {
|
|
|
|
|
|
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
|
|
|
|
|
|
SortBy: "DateCreated",
|
|
|
|
|
SortOrder: "Descending",
|
|
|
|
|
IncludeItemTypes: "Episode",
|
2013-12-23 17:00:27 -07:00
|
|
|
|
Limit: 15,
|
2013-04-30 20:28:26 -07:00
|
|
|
|
Recursive: true,
|
2013-05-03 19:33:44 -07:00
|
|
|
|
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
2013-10-16 16:35:11 -07:00
|
|
|
|
Filters: "IsUnplayed",
|
|
|
|
|
ExcludeLocationTypes: "Virtual"
|
2013-04-30 20:28:26 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
|
|
|
|
|
|
|
|
|
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
|
|
|
|
items: result.Items,
|
|
|
|
|
useAverageAspectRatio: true,
|
|
|
|
|
shape: "backdrop",
|
|
|
|
|
showTitle: true,
|
2013-12-22 10:16:24 -07:00
|
|
|
|
showParentTitle: true,
|
|
|
|
|
overlayText: true
|
2014-01-14 08:50:39 -07:00
|
|
|
|
|
|
|
|
|
})).createPosterItemHoverMenu();
|
2013-04-30 20:28:26 -07:00
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
|
|
SortBy: "DatePlayed",
|
|
|
|
|
SortOrder: "Descending",
|
|
|
|
|
IncludeItemTypes: "Episode",
|
|
|
|
|
Filters: "IsResumable",
|
2013-12-22 11:58:51 -07:00
|
|
|
|
Limit: 3,
|
2013-04-30 20:28:26 -07:00
|
|
|
|
Recursive: true,
|
2013-10-24 10:49:24 -07:00
|
|
|
|
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
|
|
|
|
|
ExcludeLocationTypes: "Virtual"
|
2013-04-30 20:28:26 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
|
|
|
|
|
|
|
|
|
if (result.Items.length) {
|
|
|
|
|
$('#resumableSection', page).show();
|
|
|
|
|
} else {
|
|
|
|
|
$('#resumableSection', page).hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
|
|
|
|
|
items: result.Items,
|
|
|
|
|
useAverageAspectRatio: true,
|
|
|
|
|
shape: "backdrop",
|
|
|
|
|
showTitle: true,
|
2013-05-03 19:33:44 -07:00
|
|
|
|
showParentTitle: true,
|
2013-12-22 10:16:24 -07:00
|
|
|
|
overlayText: true
|
2014-01-14 08:50:39 -07:00
|
|
|
|
|
|
|
|
|
})).createPosterItemHoverMenu();
|
2013-04-30 20:28:26 -07:00
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
2013-04-01 18:28:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})(jQuery, document);
|