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

63 lines
1.4 KiB
JavaScript
Raw Normal View History

2014-10-15 23:26:39 -04:00
(function ($, document) {
2014-01-12 10:58:47 -05:00
function reload(page) {
Dashboard.showLoadingMsg();
2014-10-15 23:26:39 -04:00
ApiClient.getLiveTvRecommendedPrograms({
2014-01-12 10:58:47 -05:00
userId: Dashboard.getCurrentUserId(),
IsAiring: true,
limit: 18
2014-01-12 10:58:47 -05:00
}).done(function (result) {
2014-05-09 15:43:06 -04:00
2014-01-12 10:58:47 -05:00
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
2015-01-04 09:18:28 -05:00
shape: "square",
2014-01-12 10:58:47 -05:00
showTitle: true,
showParentTitle: true,
2014-08-01 22:34:45 -04:00
overlayText: true,
2015-01-23 01:15:15 -05:00
coverImage: true,
lazy: true
2014-01-12 10:58:47 -05:00
});
2015-01-23 01:15:15 -05:00
$('.activeProgramItems', page).html(html).lazyChildren();
2014-01-12 10:58:47 -05:00
});
2014-10-15 23:26:39 -04:00
ApiClient.getLiveTvRecommendedPrograms({
2014-01-12 10:58:47 -05:00
userId: Dashboard.getCurrentUserId(),
IsAiring: false,
HasAired: false,
limit: 18
2014-01-12 10:58:47 -05:00
}).done(function (result) {
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
2015-01-04 09:18:28 -05:00
shape: "square",
2014-01-12 10:58:47 -05:00
showTitle: true,
showParentTitle: true,
2014-08-01 22:34:45 -04:00
overlayText: true,
2015-01-23 01:15:15 -05:00
coverImage: true,
lazy: true
2014-01-12 10:58:47 -05:00
});
2015-01-23 01:15:15 -05:00
$('.upcomingProgramItems', page).html(html).lazyChildren();
2014-01-12 10:58:47 -05:00
});
}
$(document).on('pagebeforeshow', "#liveTvSuggestedPage", function () {
var page = this;
reload(page);
});
2014-10-15 23:26:39 -04:00
})(jQuery, document);