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

40 lines
1.1 KiB
JavaScript
Raw Normal View History

2014-02-22 22:52:30 -07:00
(function ($, document) {
$(document).on('pagebeforeshow', "#tvNextUpPage", function () {
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",
ParentId: parentId,
2014-11-30 12:01:33 -07:00
ImageTypeLimit: 1,
2014-12-01 05:43:34 -07:00
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
2014-02-22 22:52:30 -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({
items: items,
2015-01-22 23:15:15 -07:00
shape: "backdrop",
preferThumb: true,
inheritThumb: false,
2014-07-15 12:16:16 -07:00
showParentTitle: false,
showUnplayedIndicator: false,
showChildCountIndicator: true,
2014-12-12 20:56:30 -07:00
overlayText: true,
lazy: true
2014-02-22 22:52:30 -07:00
2015-01-22 23:15:15 -07:00
})).lazyChildren();
2014-02-22 22:52:30 -07:00
});
});
})(jQuery, document);