mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix: eslint no-shadow errors
This commit is contained in:
parent
6a93a2eb29
commit
832b9eaf4d
30 changed files with 273 additions and 271 deletions
|
@ -535,13 +535,13 @@ class AppRouter {
|
|||
}
|
||||
|
||||
if (item === 'list') {
|
||||
let url = '#/list.html?serverId=' + options.serverId + '&type=' + options.itemTypes;
|
||||
let urlForList = '#/list.html?serverId=' + options.serverId + '&type=' + options.itemTypes;
|
||||
|
||||
if (options.isFavorite) {
|
||||
url += '&IsFavorite=true';
|
||||
urlForList += '&IsFavorite=true';
|
||||
}
|
||||
|
||||
return url;
|
||||
return urlForList;
|
||||
}
|
||||
|
||||
if (item === 'livetv') {
|
||||
|
|
|
@ -132,14 +132,14 @@ import './backdrop.scss';
|
|||
}
|
||||
|
||||
let hasInternalBackdrop;
|
||||
function internalBackdrop(enabled) {
|
||||
hasInternalBackdrop = enabled;
|
||||
function internalBackdrop(isEnabled) {
|
||||
hasInternalBackdrop = isEnabled;
|
||||
setBackgroundContainerBackgroundEnabled();
|
||||
}
|
||||
|
||||
let hasExternalBackdrop;
|
||||
export function externalBackdrop(enabled) {
|
||||
hasExternalBackdrop = enabled;
|
||||
export function externalBackdrop(isEnabled) {
|
||||
hasExternalBackdrop = isEnabled;
|
||||
setBackgroundContainerBackgroundEnabled();
|
||||
}
|
||||
|
||||
|
|
|
@ -105,8 +105,8 @@ export default class channelMapper {
|
|||
return html;
|
||||
}
|
||||
|
||||
function initEditor(dlg, options) {
|
||||
getChannelMappingOptions(options.serverId, options.providerId).then(result => {
|
||||
function initEditor(dlg, initOptions) {
|
||||
getChannelMappingOptions(initOptions.serverId, initOptions.providerId).then(result => {
|
||||
currentMappingOptions = result;
|
||||
const channelsElement = dlg.querySelector('.channels');
|
||||
channelsElement.innerHTML = result.TunerChannels.map(channel => {
|
||||
|
|
|
@ -251,8 +251,8 @@ class DirectoryBrowser {
|
|||
}
|
||||
Promise.all([getSystemInfo(), getDefaultPath(options)]).then(
|
||||
responses => {
|
||||
const systemInfo = responses[0];
|
||||
const initialPath = responses[1];
|
||||
const fetchedSystemInfo = responses[0];
|
||||
const fetchedInitialPath = responses[1];
|
||||
const dlg = dialogHelper.createDialog({
|
||||
size: 'small',
|
||||
removeOnClose: true,
|
||||
|
@ -270,7 +270,7 @@ class DirectoryBrowser {
|
|||
html += escapeHtml(options.header || '') || globalize.translate('HeaderSelectPath');
|
||||
html += '</h3>';
|
||||
html += '</div>';
|
||||
html += getEditorHtml(options, systemInfo);
|
||||
html += getEditorHtml(options, fetchedSystemInfo);
|
||||
dlg.innerHTML = html;
|
||||
initEditor(dlg, options, fileOptions);
|
||||
dlg.addEventListener('close', onDialogClosed);
|
||||
|
@ -279,13 +279,13 @@ class DirectoryBrowser {
|
|||
dialogHelper.close(dlg);
|
||||
});
|
||||
this.currentDialog = dlg;
|
||||
dlg.querySelector('#txtDirectoryPickerPath').value = initialPath;
|
||||
dlg.querySelector('#txtDirectoryPickerPath').value = fetchedInitialPath;
|
||||
const txtNetworkPath = dlg.querySelector('#txtNetworkPath');
|
||||
if (txtNetworkPath) {
|
||||
txtNetworkPath.value = options.networkSharePath || '';
|
||||
}
|
||||
if (!options.pathReadOnly) {
|
||||
refreshDirectoryBrowser(dlg, initialPath, fileOptions, true);
|
||||
refreshDirectoryBrowser(dlg, fetchedInitialPath, fileOptions, true);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -429,7 +429,7 @@ function Guide(options) {
|
|||
return '<span class="material-icons programIcon timerIcon fiber_manual_record" aria-hidden="true"></span>';
|
||||
}
|
||||
|
||||
function getChannelProgramsHtml(context, date, channel, programs, options, listInfo) {
|
||||
function getChannelProgramsHtml(context, date, channel, programs, programOptions, listInfo) {
|
||||
let html = '';
|
||||
|
||||
const startMs = date.getTime();
|
||||
|
@ -542,21 +542,21 @@ function Guide(options) {
|
|||
html += '<div class="guideProgramNameText">' + escapeHtml(program.Name);
|
||||
|
||||
let indicatorHtml = null;
|
||||
if (program.IsLive && options.showLiveIndicator) {
|
||||
if (program.IsLive && programOptions.showLiveIndicator) {
|
||||
indicatorHtml = '<span class="liveTvProgram guideProgramIndicator">' + globalize.translate('Live') + '</span>';
|
||||
} else if (program.IsPremiere && options.showPremiereIndicator) {
|
||||
} else if (program.IsPremiere && programOptions.showPremiereIndicator) {
|
||||
indicatorHtml = '<span class="premiereTvProgram guideProgramIndicator">' + globalize.translate('Premiere') + '</span>';
|
||||
} else if (program.IsSeries && !program.IsRepeat && options.showNewIndicator) {
|
||||
} else if (program.IsSeries && !program.IsRepeat && programOptions.showNewIndicator) {
|
||||
indicatorHtml = '<span class="newTvProgram guideProgramIndicator">' + globalize.translate('New') + '</span>';
|
||||
} else if (program.IsSeries && program.IsRepeat && options.showRepeatIndicator) {
|
||||
} else if (program.IsSeries && program.IsRepeat && programOptions.showRepeatIndicator) {
|
||||
indicatorHtml = '<span class="repeatTvProgram guideProgramIndicator">' + globalize.translate('Repeat') + '</span>';
|
||||
}
|
||||
html += indicatorHtml || '';
|
||||
|
||||
if ((program.EpisodeTitle && options.showEpisodeTitle)) {
|
||||
if ((program.EpisodeTitle && programOptions.showEpisodeTitle)) {
|
||||
html += '<div class="guideProgramSecondaryInfo">';
|
||||
|
||||
if (program.EpisodeTitle && options.showEpisodeTitle) {
|
||||
if (program.EpisodeTitle && programOptions.showEpisodeTitle) {
|
||||
html += '<span class="programSecondaryTitle">' + escapeHtml(program.EpisodeTitle) + '</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
|
@ -564,7 +564,7 @@ function Guide(options) {
|
|||
|
||||
html += '</div>';
|
||||
|
||||
if (program.IsHD && options.showHdIcon) {
|
||||
if (program.IsHD && programOptions.showHdIcon) {
|
||||
if (layoutManager.tv) {
|
||||
html += '<div class="programIcon guide-programTextIcon guide-programTextIcon-tv">HD</div>';
|
||||
} else {
|
||||
|
@ -633,7 +633,7 @@ function Guide(options) {
|
|||
imageLoader.lazyChildren(channelList);
|
||||
}
|
||||
|
||||
function renderPrograms(context, date, channels, programs, options) {
|
||||
function renderPrograms(context, date, channels, programs, programOptions) {
|
||||
const listInfo = {
|
||||
startIndex: 0
|
||||
};
|
||||
|
@ -641,7 +641,7 @@ function Guide(options) {
|
|||
const html = [];
|
||||
|
||||
for (const channel of channels) {
|
||||
html.push(getChannelProgramsHtml(context, date, channel, programs, options, listInfo));
|
||||
html.push(getChannelProgramsHtml(context, date, channel, programs, programOptions, listInfo));
|
||||
}
|
||||
|
||||
programGrid.innerHTML = html.join('');
|
||||
|
|
|
@ -39,8 +39,8 @@ import template from './imageeditor.template.html';
|
|||
reloadItem(page, item, apiClient, focusContext);
|
||||
} else {
|
||||
apiClient = ServerConnections.getApiClient(currentItem.ServerId);
|
||||
apiClient.getItem(apiClient.getCurrentUserId(), currentItem.Id).then(function (item) {
|
||||
reloadItem(page, item, apiClient, focusContext);
|
||||
apiClient.getItem(apiClient.getCurrentUserId(), currentItem.Id).then(function (itemToReload) {
|
||||
reloadItem(page, itemToReload, apiClient, focusContext);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ import '../elements/emby-button/emby-button';
|
|||
return true;
|
||||
}
|
||||
|
||||
function configureSwipeTabs(view, tabsElem) {
|
||||
function configureSwipeTabs(view, currentElement) {
|
||||
if (!browser.touch) {
|
||||
return;
|
||||
}
|
||||
|
@ -55,13 +55,13 @@ import '../elements/emby-button/emby-button';
|
|||
// implement without hammer
|
||||
const onSwipeLeft = function (e, target) {
|
||||
if (allowSwipe(target) && view.contains(target)) {
|
||||
tabsElem.selectNext();
|
||||
currentElement.selectNext();
|
||||
}
|
||||
};
|
||||
|
||||
const onSwipeRight = function (e, target) {
|
||||
if (allowSwipe(target) && view.contains(target)) {
|
||||
tabsElem.selectPrevious();
|
||||
currentElement.selectPrevious();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -98,9 +98,9 @@ function hideOsd() {
|
|||
}
|
||||
}
|
||||
|
||||
function setIcon(iconElement, icon) {
|
||||
iconElement.classList.remove('brightness_high', 'brightness_medium', 'brightness_low');
|
||||
iconElement.classList.add(icon);
|
||||
function setIcon(iconHtmlElement, icon) {
|
||||
iconHtmlElement.classList.remove('brightness_high', 'brightness_medium', 'brightness_low');
|
||||
iconHtmlElement.classList.add(icon);
|
||||
}
|
||||
|
||||
function updateElementsFromPlayer(brightness) {
|
||||
|
|
|
@ -1764,9 +1764,9 @@ class PlaybackManager {
|
|||
MediaTypes: 'Photo,Video',
|
||||
Limit: UNLIMITED_ITEMS
|
||||
}).then(function (result) {
|
||||
const items = result.Items;
|
||||
const playbackItems = result.Items;
|
||||
|
||||
let index = items.map(function (i) {
|
||||
let index = playbackItems.map(function (i) {
|
||||
return i.Id;
|
||||
}).indexOf(firstItem.Id);
|
||||
|
||||
|
|
|
@ -251,8 +251,8 @@ import toast from './toast/toast';
|
|||
} else if (action === 'playmenu') {
|
||||
showPlayMenu(card, target);
|
||||
} else if (action === 'edit') {
|
||||
getItem(target).then(item => {
|
||||
editItem(item, serverId);
|
||||
getItem(target).then(itemToEdit => {
|
||||
editItem(itemToEdit, serverId);
|
||||
});
|
||||
} else if (action === 'playtrailer') {
|
||||
getItem(target).then(playTrailer);
|
||||
|
@ -293,21 +293,21 @@ import toast from './toast/toast';
|
|||
const apiClient = ServerConnections.getApiClient(serverId);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const serverId = apiClient.serverInfo().Id;
|
||||
const myServerId = apiClient.serverInfo().Id;
|
||||
|
||||
if (item.Type === 'Timer') {
|
||||
if (item.ProgramId) {
|
||||
import('./recordingcreator/recordingcreator').then(({default: recordingCreator}) => {
|
||||
recordingCreator.show(item.ProgramId, serverId).then(resolve, reject);
|
||||
recordingCreator.show(item.ProgramId, myServerId).then(resolve, reject);
|
||||
});
|
||||
} else {
|
||||
import('./recordingcreator/recordingeditor').then(({default: recordingEditor}) => {
|
||||
recordingEditor.show(item.Id, serverId).then(resolve, reject);
|
||||
recordingEditor.show(item.Id, myServerId).then(resolve, reject);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
import('./metadataEditor/metadataEditor').then(({default: metadataEditor}) => {
|
||||
metadataEditor.show(item.Id, serverId).then(resolve, reject);
|
||||
metadataEditor.show(item.Id, myServerId).then(resolve, reject);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -141,11 +141,11 @@ export default function (options) {
|
|||
* Creates the HTML markup for the dialog and the OSD.
|
||||
* @param {Object} options - Options used to create the dialog and slideshow.
|
||||
*/
|
||||
function createElements(options) {
|
||||
currentOptions = options;
|
||||
function createElements(slideshowOptions) {
|
||||
currentOptions = slideshowOptions;
|
||||
|
||||
dialog = dialogHelper.createDialog({
|
||||
exitAnimationDuration: options.interactive ? 400 : 800,
|
||||
exitAnimationDuration: slideshowOptions.interactive ? 400 : 800,
|
||||
size: 'fullscreen',
|
||||
autoFocus: false,
|
||||
scrollY: false,
|
||||
|
@ -159,7 +159,7 @@ export default function (options) {
|
|||
|
||||
html += '<div class="slideshowSwiperContainer"><div class="swiper-wrapper"></div></div>';
|
||||
|
||||
if (options.interactive && !layoutManager.tv) {
|
||||
if (slideshowOptions.interactive && !layoutManager.tv) {
|
||||
const actionButtonsOnTop = layoutManager.mobile;
|
||||
|
||||
html += getIcon('keyboard_arrow_left', 'btnSlideshowPrevious slideshowButton hide-mouse-idle-tv', false);
|
||||
|
@ -169,7 +169,7 @@ export default function (options) {
|
|||
if (actionButtonsOnTop) {
|
||||
html += getIcon('play_arrow', 'btnSlideshowPause slideshowButton', true);
|
||||
|
||||
if (appHost.supports('filedownload') && options.user && options.user.Policy.EnableContentDownloading) {
|
||||
if (appHost.supports('filedownload') && slideshowOptions.user && slideshowOptions.user.Policy.EnableContentDownloading) {
|
||||
html += getIcon('file_download', 'btnDownload slideshowButton', true);
|
||||
}
|
||||
if (appHost.supports('sharing')) {
|
||||
|
@ -187,7 +187,7 @@ export default function (options) {
|
|||
html += '<div class="slideshowBottomBar hide">';
|
||||
|
||||
html += getIcon('play_arrow', 'btnSlideshowPause slideshowButton', true, true);
|
||||
if (appHost.supports('filedownload') && options.user && options.user.Policy.EnableContentDownloading) {
|
||||
if (appHost.supports('filedownload') && slideshowOptions.user && slideshowOptions.user.Policy.EnableContentDownloading) {
|
||||
html += getIcon('file_download', 'btnDownload slideshowButton', true);
|
||||
}
|
||||
if (appHost.supports('sharing')) {
|
||||
|
@ -206,7 +206,7 @@ export default function (options) {
|
|||
|
||||
dialog.innerHTML = html;
|
||||
|
||||
if (options.interactive && !layoutManager.tv) {
|
||||
if (slideshowOptions.interactive && !layoutManager.tv) {
|
||||
dialog.querySelector('.btnSlideshowExit').addEventListener('click', function () {
|
||||
dialogHelper.close(dialog);
|
||||
});
|
||||
|
@ -331,7 +331,7 @@ export default function (options) {
|
|||
* @param {HTMLElement} dialog - Element containing the dialog.
|
||||
* @param {Object} options - Options used to initialize the Swiper instance.
|
||||
*/
|
||||
function loadSwiper(dialog, options) {
|
||||
function loadSwiper(dialogElement, swiperOptions) {
|
||||
let slides;
|
||||
if (currentOptions.slides) {
|
||||
slides = currentOptions.slides;
|
||||
|
@ -344,7 +344,7 @@ export default function (options) {
|
|||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import('swiper/bundle').then(({ Swiper }) => {
|
||||
swiperInstance = new Swiper(dialog.querySelector('.slideshowSwiperContainer'), {
|
||||
swiperInstance = new Swiper(dialogElement.querySelector('.slideshowSwiperContainer'), {
|
||||
direction: 'horizontal',
|
||||
// Loop is disabled due to the virtual slides option not supporting it.
|
||||
loop: false,
|
||||
|
@ -352,14 +352,14 @@ export default function (options) {
|
|||
minRatio: 1,
|
||||
toggle: true
|
||||
},
|
||||
autoplay: !options.interactive || !!options.autoplay,
|
||||
autoplay: !swiperOptions.interactive || !!swiperOptions.autoplay,
|
||||
keyboard: {
|
||||
enabled: true
|
||||
},
|
||||
preloadImages: true,
|
||||
slidesPerView: 1,
|
||||
slidesPerColumn: 1,
|
||||
initialSlide: options.startIndex || 0,
|
||||
initialSlide: swiperOptions.startIndex || 0,
|
||||
speed: 240,
|
||||
navigation: {
|
||||
nextEl: '.btnSlideshowNext',
|
||||
|
|
|
@ -12,6 +12,43 @@ import './style.scss';
|
|||
import Dashboard from '../../utils/dashboard';
|
||||
import Events from '../../utils/events.ts';
|
||||
|
||||
function getTunerName(providerId) {
|
||||
switch (providerId.toLowerCase()) {
|
||||
case 'm3u':
|
||||
return 'M3U Playlist';
|
||||
case 'hdhomerun':
|
||||
return 'HDHomerun';
|
||||
case 'satip':
|
||||
return 'DVB';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
function refreshTunerDevices(page, providerInfo, devices) {
|
||||
let html = '';
|
||||
|
||||
for (let i = 0, length = devices.length; i < length; i++) {
|
||||
const device = devices[i];
|
||||
html += '<div class="listItem">';
|
||||
const enabledTuners = providerInfo.EnabledTuners || [];
|
||||
const isChecked = providerInfo.EnableAllTuners || enabledTuners.indexOf(device.Id) !== -1;
|
||||
const checkedAttribute = isChecked ? ' checked' : '';
|
||||
html += '<label class="checkboxContainer listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" data-id="' + device.Id + '" class="chkTuner" ' + checkedAttribute + '/><span></span></label>';
|
||||
html += '<div class="listItemBody two-line">';
|
||||
html += '<div class="listItemBodyText">';
|
||||
html += device.FriendlyName || getTunerName(device.Type);
|
||||
html += '</div>';
|
||||
html += '<div class="listItemBodyText secondary">';
|
||||
html += device.Url;
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
page.querySelector('.tunerList').innerHTML = html;
|
||||
}
|
||||
|
||||
export default function (page, providerId, options) {
|
||||
function reload() {
|
||||
loading.show();
|
||||
|
@ -202,43 +239,6 @@ export default function (page, providerId, options) {
|
|||
});
|
||||
}
|
||||
|
||||
function getTunerName(providerId) {
|
||||
switch (providerId.toLowerCase()) {
|
||||
case 'm3u':
|
||||
return 'M3U Playlist';
|
||||
case 'hdhomerun':
|
||||
return 'HDHomerun';
|
||||
case 'satip':
|
||||
return 'DVB';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
function refreshTunerDevices(page, providerInfo, devices) {
|
||||
let html = '';
|
||||
|
||||
for (let i = 0, length = devices.length; i < length; i++) {
|
||||
const device = devices[i];
|
||||
html += '<div class="listItem">';
|
||||
const enabledTuners = providerInfo.EnabledTuners || [];
|
||||
const isChecked = providerInfo.EnableAllTuners || enabledTuners.indexOf(device.Id) !== -1;
|
||||
const checkedAttribute = isChecked ? ' checked' : '';
|
||||
html += '<label class="checkboxContainer listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" data-id="' + device.Id + '" class="chkTuner" ' + checkedAttribute + '/><span></span></label>';
|
||||
html += '<div class="listItemBody two-line">';
|
||||
html += '<div class="listItemBodyText">';
|
||||
html += device.FriendlyName || getTunerName(device.Type);
|
||||
html += '</div>';
|
||||
html += '<div class="listItemBodyText secondary">';
|
||||
html += device.Url;
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
page.querySelector('.tunerList').innerHTML = html;
|
||||
}
|
||||
|
||||
let listingsId;
|
||||
const self = this;
|
||||
|
||||
|
|
|
@ -8,6 +8,62 @@ import '../../elements/emby-button/paper-icon-button-light';
|
|||
import Dashboard from '../../utils/dashboard';
|
||||
import Events from '../../utils/events.ts';
|
||||
|
||||
function getTunerName(providerId) {
|
||||
switch (providerId.toLowerCase()) {
|
||||
case 'm3u':
|
||||
return 'M3U Playlist';
|
||||
case 'hdhomerun':
|
||||
return 'HDHomerun';
|
||||
case 'satip':
|
||||
return 'DVB';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
function refreshTunerDevices(page, providerInfo, devices) {
|
||||
let html = '';
|
||||
|
||||
for (let i = 0, length = devices.length; i < length; i++) {
|
||||
const device = devices[i];
|
||||
html += '<div class="listItem">';
|
||||
const enabledTuners = providerInfo.EnabledTuners || [];
|
||||
const isChecked = providerInfo.EnableAllTuners || enabledTuners.indexOf(device.Id) !== -1;
|
||||
const checkedAttribute = isChecked ? ' checked' : '';
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkTuner" data-id="' + device.Id + '" ' + checkedAttribute + '><span></span></label>';
|
||||
html += '<div class="listItemBody two-line">';
|
||||
html += '<div class="listItemBodyText">';
|
||||
html += device.FriendlyName || getTunerName(device.Type);
|
||||
html += '</div>';
|
||||
html += '<div class="listItemBodyText secondary">';
|
||||
html += device.Url;
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
page.querySelector('.tunerList').innerHTML = html;
|
||||
}
|
||||
|
||||
function onSelectPathClick(e) {
|
||||
const page = $(e.target).parents('.xmltvForm')[0];
|
||||
|
||||
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
|
||||
const picker = new DirectoryBrowser();
|
||||
picker.show({
|
||||
includeFiles: true,
|
||||
callback: function (path) {
|
||||
if (path) {
|
||||
const txtPath = page.querySelector('.txtPath');
|
||||
txtPath.value = path;
|
||||
txtPath.focus();
|
||||
}
|
||||
picker.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export default function (page, providerId, options) {
|
||||
function getListingProvider(config, id) {
|
||||
if (config && id) {
|
||||
|
@ -105,62 +161,6 @@ export default function (page, providerId, options) {
|
|||
});
|
||||
}
|
||||
|
||||
function getTunerName(providerId) {
|
||||
switch (providerId.toLowerCase()) {
|
||||
case 'm3u':
|
||||
return 'M3U Playlist';
|
||||
case 'hdhomerun':
|
||||
return 'HDHomerun';
|
||||
case 'satip':
|
||||
return 'DVB';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
function refreshTunerDevices(page, providerInfo, devices) {
|
||||
let html = '';
|
||||
|
||||
for (let i = 0, length = devices.length; i < length; i++) {
|
||||
const device = devices[i];
|
||||
html += '<div class="listItem">';
|
||||
const enabledTuners = providerInfo.EnabledTuners || [];
|
||||
const isChecked = providerInfo.EnableAllTuners || enabledTuners.indexOf(device.Id) !== -1;
|
||||
const checkedAttribute = isChecked ? ' checked' : '';
|
||||
html += '<label class="listItemCheckboxContainer"><input type="checkbox" is="emby-checkbox" class="chkTuner" data-id="' + device.Id + '" ' + checkedAttribute + '><span></span></label>';
|
||||
html += '<div class="listItemBody two-line">';
|
||||
html += '<div class="listItemBodyText">';
|
||||
html += device.FriendlyName || getTunerName(device.Type);
|
||||
html += '</div>';
|
||||
html += '<div class="listItemBodyText secondary">';
|
||||
html += device.Url;
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
page.querySelector('.tunerList').innerHTML = html;
|
||||
}
|
||||
|
||||
function onSelectPathClick(e) {
|
||||
const page = $(e.target).parents('.xmltvForm')[0];
|
||||
|
||||
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
|
||||
const picker = new DirectoryBrowser();
|
||||
picker.show({
|
||||
includeFiles: true,
|
||||
callback: function (path) {
|
||||
if (path) {
|
||||
const txtPath = page.querySelector('.txtPath');
|
||||
txtPath.value = path;
|
||||
txtPath.focus();
|
||||
}
|
||||
picker.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const self = this;
|
||||
|
||||
self.submit = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue