mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
62 lines
1.5 KiB
JavaScript
62 lines
1.5 KiB
JavaScript
(function ($, document, apiClient) {
|
|
|
|
function reload(page) {
|
|
|
|
Dashboard.showLoadingMsg();
|
|
var screenWidth = $(window).width();
|
|
|
|
apiClient.getLiveTvRecommendedPrograms({
|
|
|
|
userId: Dashboard.getCurrentUserId(),
|
|
IsAiring: true,
|
|
limit: 12
|
|
|
|
}).done(function (result) {
|
|
|
|
var html = LibraryBrowser.getPosterViewHtml({
|
|
|
|
items: result.Items,
|
|
shape: "auto",
|
|
showTitle: true,
|
|
showParentTitle: true,
|
|
overlayText: screenWidth >= 600,
|
|
coverImage: true
|
|
|
|
});
|
|
|
|
$('.activeProgramItems', page).html(html).createPosterItemMenus();
|
|
});
|
|
|
|
apiClient.getLiveTvRecommendedPrograms({
|
|
|
|
userId: Dashboard.getCurrentUserId(),
|
|
IsAiring: false,
|
|
HasAired: false,
|
|
limit: 12
|
|
|
|
}).done(function (result) {
|
|
|
|
var html = LibraryBrowser.getPosterViewHtml({
|
|
|
|
items: result.Items,
|
|
shape: "auto",
|
|
showTitle: true,
|
|
showParentTitle: true,
|
|
overlayText: screenWidth >= 600,
|
|
coverImage: true
|
|
|
|
});
|
|
|
|
$('.upcomingProgramItems', page).html(html).createPosterItemMenus();
|
|
});
|
|
}
|
|
|
|
$(document).on('pagebeforeshow', "#liveTvSuggestedPage", function () {
|
|
|
|
var page = this;
|
|
|
|
reload(page);
|
|
|
|
});
|
|
|
|
})(jQuery, document, ApiClient); |