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/tvnextup.js

46 lines
1.2 KiB
JavaScript
Raw Normal View History

2013-05-01 09:45:25 -04:00
(function ($, document) {
$(document).on('pagebeforeshow', "#tvNextUpPage", function () {
var page = this;
var options = {
Limit: 24,
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated",
UserId: Dashboard.getCurrentUserId(),
ExcludeLocationTypes: "Virtual"
2013-05-01 09:45:25 -04:00
};
2013-05-04 16:02:20 -04:00
ApiClient.getNextUpEpisodes(options).done(function (result) {
2013-05-01 09:45:25 -04:00
if (result.Items.length) {
$('#resumableSection', page).show();
} else {
$('#resumableSection', page).hide();
}
if (result.Items.length) {
$('#nextUpItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
useAverageAspectRatio: true,
shape: "backdrop",
showTitle: true,
2013-12-22 12:16:24 -05:00
showParentTitle: true,
overlayText: true
2013-05-01 09:45:25 -04:00
}));
} else {
$('#nextUpItems', page).html('<br/><p style="text-align:center;">None found. Start watching your shows!</p>');
}
});
});
})(jQuery, document);