1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/tvupcoming.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

2013-10-24 13:49:24 -04:00
(function ($, document) {
$(document).on('pagebeforeshow', "#tvUpcomingPage", function () {
var page = this;
var query = {
2013-10-24 13:49:24 -04:00
2014-03-06 00:17:13 -05:00
Limit: 32,
Fields: "SeriesInfo,UserData",
2014-05-29 15:34:20 -04:00
UserId: Dashboard.getCurrentUserId()
2013-10-24 13:49:24 -04:00
};
2014-03-06 00:17:13 -05:00
$.getJSON(ApiClient.getUrl("Shows/Upcoming", query)).done(function (result) {
2014-03-06 00:17:13 -05:00
var items = result.Items;
2014-03-31 17:04:22 -04:00
if (items.length) {
$('.noItemsMessage', page).hide();
} else {
$('.noItemsMessage', page).show();
2013-10-24 13:49:24 -04:00
}
2013-10-24 13:49:24 -04:00
$('#upcomingItems', page).html(LibraryBrowser.getPosterViewHtml({
2014-03-06 00:17:13 -05:00
items: items,
2013-10-24 13:49:24 -04:00
showLocationTypeIndicator: false,
shape: "backdrop",
showTitle: true,
showPremiereDate: true,
showPremiereDateIndex: true,
2014-05-29 15:34:20 -04:00
preferThumb: true,
context: 'home-upcoming',
lazy: true
2014-03-06 00:17:13 -05:00
2014-05-29 15:34:20 -04:00
})).trigger('create').createPosterItemMenus();
2013-10-24 13:49:24 -04:00
});
});
})(jQuery, document);