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

update tuner setup

This commit is contained in:
Luke Pulverenti 2015-07-23 09:23:22 -04:00
parent 8ef120c759
commit 86dea1fa4c
14 changed files with 394 additions and 248 deletions

View file

@ -1,16 +1,9 @@
(function ($, document, window) {
function loadPage(page, config, liveTvInfo) {
function loadPage(page, config) {
if (liveTvInfo.IsEnabled) {
$('.liveTvSettingsForm', page).show();
$('.noLiveTvServices', page).hide();
} else {
$('.liveTvSettingsForm', page).hide();
$('.noLiveTvServices', page).show();
}
$('.liveTvSettingsForm', page).show();
$('.noLiveTvServices', page).hide();
$('#selectGuideDays', page).val(config.GuideDays || '').selectmenu('refresh');
@ -47,13 +40,9 @@
var page = this;
var promise1 = ApiClient.getNamedConfiguration("livetv");
ApiClient.getNamedConfiguration("livetv").done(function (config) {
var promise2 = ApiClient.getLiveTvInfo();
$.when(promise1, promise2).done(function (response1, response2) {
loadPage(page, response1[0], response2[0]);
loadPage(page, config);
});