2014-02-22 22:52:30 -07:00
|
|
|
|
(function ($, document) {
|
|
|
|
|
|
|
|
|
|
$(document).on('pagebeforeshow', "#tvNextUpPage", function () {
|
|
|
|
|
|
2014-07-04 22:21:13 -07:00
|
|
|
|
var userId = Dashboard.getCurrentUserId();
|
2014-02-22 22:52:30 -07:00
|
|
|
|
|
2014-05-01 19:54:33 -07:00
|
|
|
|
var parentId = LibraryMenu.getTopParentId();
|
|
|
|
|
|
2014-02-22 22:52:30 -07:00
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
|
|
|
|
|
|
IncludeItemTypes: "Episode",
|
2014-12-01 05:43:34 -07:00
|
|
|
|
Limit: 30,
|
2014-12-10 23:20:28 -07:00
|
|
|
|
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
2014-07-04 22:21:13 -07:00
|
|
|
|
ParentId: parentId,
|
2014-11-30 12:01:33 -07:00
|
|
|
|
IsPlayed: false,
|
|
|
|
|
ImageTypeLimit: 1,
|
2014-12-01 05:43:34 -07:00
|
|
|
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
2014-02-22 22:52:30 -07:00
|
|
|
|
};
|
|
|
|
|
|
2014-07-04 22:21:13 -07:00
|
|
|
|
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
|
2014-02-22 22:52:30 -07:00
|
|
|
|
|
|
|
|
|
$('#latestEpisodes', page).html(LibraryBrowser.getPosterViewHtml({
|
2014-07-04 22:21:13 -07:00
|
|
|
|
items: items,
|
2014-08-01 19:34:45 -07:00
|
|
|
|
shape: "homePageBackdrop",
|
2014-07-04 22:21:13 -07:00
|
|
|
|
preferThumb: true,
|
|
|
|
|
inheritThumb: false,
|
2014-07-15 12:16:16 -07:00
|
|
|
|
showParentTitle: false,
|
2014-07-04 22:21:13 -07:00
|
|
|
|
showUnplayedIndicator: false,
|
|
|
|
|
showChildCountIndicator: true,
|
2014-12-12 20:56:30 -07:00
|
|
|
|
overlayText: true,
|
2014-07-04 22:21:13 -07:00
|
|
|
|
lazy: true
|
2014-02-22 22:52:30 -07:00
|
|
|
|
|
2014-08-01 19:34:45 -07:00
|
|
|
|
})).trigger('create').createCardMenus();
|
2014-02-22 22:52:30 -07:00
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})(jQuery, document);
|