Fix eslint issues

This commit is contained in:
Bill Thornton 2023-03-29 00:38:22 -04:00
parent ed21a8dcdd
commit 6f3aa2f1df
85 changed files with 251 additions and 251 deletions

View File

@ -7,8 +7,8 @@ const config = () => ({
plugins: [
// Explicitly specify browserslist to override ones from node_modules
// For example, Swiper has it in its package.json
postcssPresetEnv({browsers: packageConfig.browserslist}),
autoprefixer({overrideBrowserslist: packageConfig.browserslist}),
postcssPresetEnv({ browsers: packageConfig.browserslist }),
autoprefixer({ overrideBrowserslist: packageConfig.browserslist }),
cssnano()
]
});

View File

@ -37,7 +37,7 @@ import template from './accessSchedule.template.html';
context.querySelector('#selectEnd').innerHTML = html;
}
function loadSchedule(context, {DayOfWeek, StartHour, EndHour}) {
function loadSchedule(context, { DayOfWeek, StartHour, EndHour }) {
context.querySelector('#selectDay').value = DayOfWeek || 'Sunday';
context.querySelector('#selectStart').value = StartHour || 0;
context.querySelector('#selectEnd').value = EndHour || 0;

View File

@ -309,8 +309,8 @@ function askForExit() {
exitPromise = actionsheet.show({
title: globalize.translate('MessageConfirmAppExit'),
items: [
{id: 'yes', name: globalize.translate('Yes')},
{id: 'no', name: globalize.translate('No')}
{ id: 'yes', name: globalize.translate('Yes') },
{ id: 'no', name: globalize.translate('No') }
]
}).then(function (value) {
if (value === 'yes') {
@ -366,20 +366,20 @@ export const appHost = {
};
},
deviceName: function () {
return window.NativeShell?.AppHost?.deviceName
? window.NativeShell.AppHost.deviceName() : getDeviceName();
return window.NativeShell?.AppHost?.deviceName ?
window.NativeShell.AppHost.deviceName() : getDeviceName();
},
deviceId: function () {
return window.NativeShell?.AppHost?.deviceId
? window.NativeShell.AppHost.deviceId() : getDeviceId();
return window.NativeShell?.AppHost?.deviceId ?
window.NativeShell.AppHost.deviceId() : getDeviceId();
},
appName: function () {
return window.NativeShell?.AppHost?.appName
? window.NativeShell.AppHost.appName() : appName;
return window.NativeShell?.AppHost?.appName ?
window.NativeShell.AppHost.appName() : appName;
},
appVersion: function () {
return window.NativeShell?.AppHost?.appVersion
? window.NativeShell.AppHost.appVersion() : Package.version;
return window.NativeShell?.AppHost?.appVersion ?
window.NativeShell.AppHost.appVersion() : Package.version;
},
getPushTokenInfo: function () {
return {};

View File

@ -896,13 +896,13 @@ import { appRouter } from '../appRouter';
}
if (options.showYear || options.showSeriesYear) {
const productionYear = item.ProductionYear && datetime.toLocaleString(item.ProductionYear, {useGrouping: false});
const productionYear = item.ProductionYear && datetime.toLocaleString(item.ProductionYear, { useGrouping: false });
if (item.Type === 'Series') {
if (item.Status === 'Continuing') {
lines.push(globalize.translate('SeriesYearToPresent', productionYear || ''));
} else {
if (item.EndDate && item.ProductionYear) {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), {useGrouping: false});
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
lines.push(productionYear + ((endYear === item.ProductionYear) ? '' : (' - ' + endYear)));
} else {
lines.push(productionYear || '');

View File

@ -28,7 +28,7 @@ import ServerConnections from '../ServerConnections';
}
const mediaStreams = ((item.MediaSources || [])[0] || {}).MediaStreams || [];
const videoStream = mediaStreams.filter(({Type}) => {
const videoStream = mediaStreams.filter(({ Type }) => {
return Type === 'Video';
})[0] || {};
@ -68,7 +68,7 @@ import ServerConnections from '../ServerConnections';
return html;
}
function getImgUrl({Id}, {ImageTag}, index, maxWidth, apiClient) {
function getImgUrl({ Id }, { ImageTag }, index, maxWidth, apiClient) {
if (ImageTag) {
return apiClient.getScaledImageUrl(Id, {
@ -82,7 +82,7 @@ import ServerConnections from '../ServerConnections';
return null;
}
function buildChapterCard(item, apiClient, chapter, index, {width, coverImage}, className, shape) {
function buildChapterCard(item, apiClient, chapter, index, { width, coverImage }, className, shape) {
const imgUrl = getImgUrl(item, chapter, index, width || 400, apiClient);
let cardImageContainerClass = 'cardContent cardContent-shadow cardImageContainer chapterCardImageContainer';

View File

@ -22,7 +22,7 @@ const Filter: FC<FilterProps> = ({
const element = useRef<HTMLDivElement>(null);
const showFilterMenu = useCallback(() => {
import('../filtermenu/filtermenu').then(({default: FilterMenu}) => {
import('../filtermenu/filtermenu').then(({ default: FilterMenu }) => {
const filterMenu = new FilterMenu();
filterMenu.show({
settings: viewQuerySettings,

View File

@ -6,7 +6,7 @@ const NewCollection: FC = () => {
const element = useRef<HTMLDivElement>(null);
const showCollectionEditor = useCallback(() => {
import('../collectionEditor/collectionEditor').then(({default: CollectionEditor}) => {
import('../collectionEditor/collectionEditor').then(({ default: CollectionEditor }) => {
const serverId = window.ApiClient.serverId();
const collectionEditor = new CollectionEditor();
collectionEditor.show({

View File

@ -16,7 +16,7 @@ const SelectView: FC<SelectViewProps> = ({
const element = useRef<HTMLDivElement>(null);
const showViewSettingsMenu = useCallback(() => {
import('../viewSettings/viewSettings').then(({default: ViewSettings}) => {
import('../viewSettings/viewSettings').then(({ default: ViewSettings }) => {
const viewsettings = new ViewSettings();
viewsettings.show({
settings: viewQuerySettings,

View File

@ -19,7 +19,7 @@ const Sort: FC<SortProps> = ({
const element = useRef<HTMLDivElement>(null);
const showSortMenu = useCallback(() => {
import('../sortmenu/sortmenu').then(({default: SortMenu}) => {
import('../sortmenu/sortmenu').then(({ default: SortMenu }) => {
const sortMenu = new SortMenu();
sortMenu.show({
settings: viewQuerySettings,

View File

@ -14,7 +14,7 @@ type IProps = {
children?: React.ReactNode
}
const AccessContainer: FunctionComponent<IProps> = ({containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => {
const AccessContainer: FunctionComponent<IProps> = ({ containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => {
return (
<div className={containerClassName}>
<h2>{globalize.translate(headerTitle)}</h2>

View File

@ -22,7 +22,7 @@ function getDisplayTime(hours = 0) {
return datetime.getDisplayTime(new Date(2000, 1, 1, hours, minutes, 0, 0));
}
const AccessScheduleList: FunctionComponent<AccessScheduleListProps> = ({index, DayOfWeek, StartHour, EndHour}: AccessScheduleListProps) => {
const AccessScheduleList: FunctionComponent<AccessScheduleListProps> = ({ index, DayOfWeek, StartHour, EndHour }: AccessScheduleListProps) => {
return (
<div
className='liSchedule listItem'

View File

@ -5,7 +5,7 @@ type IProps = {
tag?: string;
}
const BlockedTagList: FunctionComponent<IProps> = ({tag}: IProps) => {
const BlockedTagList: FunctionComponent<IProps> = ({ tag }: IProps) => {
return (
<div className='paperList'>
<div className='listItem'>

View File

@ -36,7 +36,7 @@ const createLinkElement = (activeTab: string) => ({
</a>`
});
const SectionTabs: FunctionComponent<IProps> = ({activeTab}: IProps) => {
const SectionTabs: FunctionComponent<IProps> = ({ activeTab }: IProps) => {
return (
<div
data-role='controlgroup'

View File

@ -74,7 +74,7 @@ const UserCardBox: FunctionComponent<IProps> = ({ user = {} }: IProps) => {
</div>
<div className='cardFooter visualCardBox-cardFooter'>
<div
style={{textAlign: 'right', float: 'right', paddingTop: '5px'}}
style={{ textAlign: 'right', float: 'right', paddingTop: '5px' }}
>
<IconButtonElement
is='paper-icon-button-light'

View File

@ -14,7 +14,7 @@ type IProps = {
userId: string;
}
const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
const UserPasswordForm: FunctionComponent<IProps> = ({ userId }: IProps) => {
const element = useRef<HTMLDivElement>(null);
const loadUser = useCallback(() => {
@ -76,7 +76,7 @@ const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
chkEnableLocalEasyPassword.checked = user.Configuration.EnableLocalPassword || false;
import('../../autoFocuser').then(({default: autoFocuser}) => {
import('../../autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
});
@ -214,7 +214,7 @@ const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
<div ref={element}>
<form
className='updatePasswordForm passwordSection hide'
style={{margin: '0 auto 2em'}}
style={{ margin: '0 auto 2em' }}
>
<div className='detailSection'>
<div id='fldCurrentPassword' className='inputContainer hide'>
@ -260,7 +260,7 @@ const UserPasswordForm: FunctionComponent<IProps> = ({userId}: IProps) => {
<br />
<form
className='localAccessForm localAccessSection'
style={{margin: '0 auto'}}
style={{ margin: '0 auto' }}
>
<div className='detailSection'>
<div className='detailSectionHeader'>

View File

@ -29,7 +29,7 @@ import ServerConnections from '../ServerConnections';
import template from './tvguide.template.html';
function showViewSettings(instance) {
import('./guide-settings').then(({default: guideSettingsDialog}) => {
import('./guide-settings').then(({ default: guideSettingsDialog }) => {
guideSettingsDialog.show(instance.categoryOptions).then(function () {
instance.refresh();
});

View File

@ -26,8 +26,8 @@ import Events from '../utils/events.ts';
function canPlayNativeHls() {
const media = document.createElement('video');
return !!(media.canPlayType('application/x-mpegURL').replace(/no/, '') ||
media.canPlayType('application/vnd.apple.mpegURL').replace(/no/, ''));
return !!(media.canPlayType('application/x-mpegURL').replace(/no/, '')
|| media.canPlayType('application/vnd.apple.mpegURL').replace(/no/, ''));
}
export function enableHlsJsPlayer(runTimeTicks, mediaType) {
@ -201,8 +201,8 @@ import Events from '../utils/events.ts';
.catch((e) => {
const errorName = (e.name || '').toLowerCase();
// safari uses aborterror
if (errorName === 'notallowederror' ||
errorName === 'aborterror') {
if (errorName === 'notallowederror'
|| errorName === 'aborterror') {
// swallow this error because the user can still click the play button on the video element
return Promise.resolve();
}

View File

@ -282,7 +282,7 @@ import template from './imageeditor.template.html';
const providerCount = parseInt(imageCard.getAttribute('data-providers'), 10);
const numImages = parseInt(imageCard.getAttribute('data-numimages'), 10);
import('../actionSheet/actionSheet').then(({default: actionSheet}) => {
import('../actionSheet/actionSheet').then(({ default: actionSheet }) => {
const commands = [];
commands.push({
@ -353,7 +353,7 @@ import template from './imageeditor.template.html';
addListeners(context, 'btnOpenUploadMenu', 'click', function () {
const imageType = this.getAttribute('data-imagetype');
import('../imageUploader/imageUploader').then(({default: imageUploader}) => {
import('../imageUploader/imageUploader').then(({ default: imageUploader }) => {
imageUploader.show({
theme: options.theme,

View File

@ -326,7 +326,7 @@ import toast from './toast/toast';
// eslint-disable-next-line sonarjs/max-switch-cases
switch (id) {
case 'addtocollection':
import('./collectionEditor/collectionEditor').then(({default: CollectionEditor}) => {
import('./collectionEditor/collectionEditor').then(({ default: CollectionEditor }) => {
const collectionEditor = new CollectionEditor();
collectionEditor.show({
items: [itemId],
@ -335,7 +335,7 @@ import toast from './toast/toast';
});
break;
case 'addtoplaylist':
import('./playlisteditor/playlisteditor').then(({default: playlistEditor}) => {
import('./playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
new playlistEditor({
items: [itemId],
serverId: serverId
@ -408,7 +408,7 @@ import toast from './toast/toast';
break;
}
case 'editsubtitles':
import('./subtitleeditor/subtitleeditor').then(({default: subtitleEditor}) => {
import('./subtitleeditor/subtitleeditor').then(({ default: subtitleEditor }) => {
subtitleEditor.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
});
break;
@ -464,7 +464,7 @@ import toast from './toast/toast';
playbackManager.clearQueue();
break;
case 'record':
import('./recordingcreator/recordingcreator').then(({default: recordingCreator}) => {
import('./recordingcreator/recordingcreator').then(({ default: recordingCreator }) => {
recordingCreator.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id));
});
break;
@ -535,7 +535,7 @@ import toast from './toast/toast';
}
function deleteTimer(apiClient, item, resolve, command) {
import('./recordingcreator/recordinghelper').then(({default: recordingHelper}) => {
import('./recordingcreator/recordinghelper').then(({ default: recordingHelper }) => {
const timerId = item.TimerId || item.Id;
recordingHelper.cancelTimerWithConfirmation(timerId, item.ServerId).then(function () {
getResolveFunction(resolve, command, true)();
@ -544,7 +544,7 @@ import toast from './toast/toast';
}
function deleteSeriesTimer(apiClient, item, resolve, command) {
import('./recordingcreator/recordinghelper').then(({default: recordingHelper}) => {
import('./recordingcreator/recordinghelper').then(({ default: recordingHelper }) => {
recordingHelper.cancelSeriesTimerWithConfirmation(item.Id, item.ServerId).then(function () {
getResolveFunction(resolve, command, true)();
});
@ -585,15 +585,15 @@ import toast from './toast/toast';
const serverId = apiClient.serverInfo().Id;
if (item.Type === 'Timer') {
import('./recordingcreator/recordingeditor').then(({default: recordingEditor}) => {
import('./recordingcreator/recordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(item.Id, serverId).then(resolve, reject);
});
} else if (item.Type === 'SeriesTimer') {
import('./recordingcreator/seriesrecordingeditor').then(({default: recordingEditor}) => {
import('./recordingcreator/seriesrecordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(item.Id, serverId).then(resolve, reject);
});
} else {
import('./metadataEditor/metadataEditor').then(({default: metadataEditor}) => {
import('./metadataEditor/metadataEditor').then(({ default: metadataEditor }) => {
metadataEditor.show(item.Id, serverId).then(resolve, reject);
});
}
@ -614,7 +614,7 @@ import toast from './toast/toast';
}
function refresh(apiClient, item) {
import('./refreshdialog/refreshdialog').then(({default: refreshDialog}) => {
import('./refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
new refreshDialog({
itemIds: [item.Id],
serverId: apiClient.serverInfo().Id,

View File

@ -167,7 +167,7 @@ import datetime from '../../scripts/datetime';
lines.push(escapeHtml(identifyResult.Name));
if (identifyResult.ProductionYear) {
lines.push(datetime.toLocaleString(identifyResult.ProductionYear, {useGrouping: false}));
lines.push(datetime.toLocaleString(identifyResult.ProductionYear, { useGrouping: false }));
}
let resultHtml = lines.join('<br/>');

View File

@ -316,7 +316,7 @@ import template from './libraryoptionseditor.template.html';
}
function showImageOptionsForType(type) {
import('../imageOptionsEditor/imageOptionsEditor').then(({default: ImageOptionsEditor}) => {
import('../imageOptionsEditor/imageOptionsEditor').then(({ default: ImageOptionsEditor }) => {
let typeOptions = getTypeOptions(currentLibraryOptions, type);
if (!typeOptions) {
typeOptions = {

View File

@ -65,7 +65,7 @@ import '../elements/emby-button/emby-button';
}
};
import('../scripts/touchHelper').then(({default: TouchHelper}) => {
import('../scripts/touchHelper').then(({ default: TouchHelper }) => {
const touchHelper = new TouchHelper(view.parentNode.parentNode);
Events.on(touchHelper, 'swipeleft', onSwipeLeft);

View File

@ -103,7 +103,7 @@ import template from './mediaLibraryCreator.template.html';
function onAddButtonClick() {
const page = dom.parentWithClass(this, 'dlg-librarycreator');
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
enableNetworkSharePath: true,

View File

@ -164,7 +164,7 @@ import template from './mediaLibraryEditor.template.html';
}
function showDirectoryBrowser(context, originalPath, networkPath) {
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
enableNetworkSharePath: true,

View File

@ -177,13 +177,13 @@ import * as userSettings from '../../scripts/settings/userSettings';
if (options.year !== false && item.ProductionYear && item.Type === 'Series') {
if (item.Status === 'Continuing') {
miscInfo.push(globalize.translate('SeriesYearToPresent', datetime.toLocaleString(item.ProductionYear, {useGrouping: false})));
miscInfo.push(globalize.translate('SeriesYearToPresent', datetime.toLocaleString(item.ProductionYear, { useGrouping: false })));
} else if (item.ProductionYear) {
text = datetime.toLocaleString(item.ProductionYear, {useGrouping: false});
text = datetime.toLocaleString(item.ProductionYear, { useGrouping: false });
if (item.EndDate) {
try {
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), {useGrouping: false});
const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false });
if (endYear !== item.ProductionYear) {
text += `-${endYear}`;
@ -253,7 +253,7 @@ import * as userSettings from '../../scripts/settings/userSettings';
miscInfo.push(item.ProductionYear);
} else if (item.PremiereDate) {
try {
text = datetime.toLocaleString(datetime.parseISO8601Date(item.PremiereDate).getFullYear(), {useGrouping: false});
text = datetime.toLocaleString(datetime.parseISO8601Date(item.PremiereDate).getFullYear(), { useGrouping: false });
miscInfo.push(text);
} catch (e) {
console.error('error parsing date:', item.PremiereDate);

View File

@ -211,7 +211,7 @@ import template from './metadataEditor.template.html';
}
function addElementToList(source, sortCallback) {
import('../prompt/prompt').then(({default: prompt}) => {
import('../prompt/prompt').then(({ default: prompt }) => {
prompt({
label: 'Value:'
}).then(function (text) {
@ -229,7 +229,7 @@ import template from './metadataEditor.template.html';
}
function editPerson(context, person, index) {
import('./personEditor').then(({default: personEditor}) => {
import('./personEditor').then(({ default: personEditor }) => {
personEditor.show(person).then(function (updatedPerson) {
const isNew = index === -1;
@ -253,7 +253,7 @@ import template from './metadataEditor.template.html';
}
function showMoreMenu(context, button, user) {
import('../itemContextMenu').then(({default: itemContextMenu}) => {
import('../itemContextMenu').then(({ default: itemContextMenu }) => {
const item = currentItem;
itemContextMenu.show({
@ -588,12 +588,12 @@ import template from './metadataEditor.template.html';
hideElement('#collapsibleSpecialEpisodeInfo', context);
}
if (item.Type === 'Person' ||
item.Type === 'Genre' ||
item.Type === 'Studio' ||
item.Type === 'MusicGenre' ||
item.Type === 'TvChannel' ||
item.Type === 'Book') {
if (item.Type === 'Person'
|| item.Type === 'Genre'
|| item.Type === 'Studio'
|| item.Type === 'MusicGenre'
|| item.Type === 'TvChannel'
|| item.Type === 'Book') {
hideElement('#peopleCollapsible', context);
} else {
showElement('#peopleCollapsible', context);

View File

@ -267,7 +267,7 @@ import datetime from '../../scripts/datetime';
}
break;
case 'addtocollection':
import('../collectionEditor/collectionEditor').then(({default: CollectionEditor}) => {
import('../collectionEditor/collectionEditor').then(({ default: CollectionEditor }) => {
const collectionEditor = new CollectionEditor();
collectionEditor.show({
items: items,
@ -308,7 +308,7 @@ import datetime from '../../scripts/datetime';
dispatchNeedsRefresh();
break;
case 'refresh':
import('../refreshdialog/refreshdialog').then(({default: refreshDialog}) => {
import('../refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
new refreshDialog({
itemIds: items,
serverId: serverId

View File

@ -69,7 +69,7 @@ import shell from '../../scripts/shell';
const list = [];
imageSizes.forEach((size) => {
const url = getImageUrl(item, {height: size});
const url = getImageUrl(item, { height: size });
if (url !== null) {
list.push(url);
}

View File

@ -141,7 +141,7 @@ function onManageRecordingClick() {
}
const self = this;
import('./recordingeditor').then(({default: recordingEditor}) => {
import('./recordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(self.TimerId, options.serverId, {
enableCancel: false
}).then(function () {
@ -159,7 +159,7 @@ function onManageSeriesRecordingClick() {
const self = this;
import('./seriesrecordingeditor').then(({default: seriesRecordingEditor}) => {
import('./seriesrecordingeditor').then(({ default: seriesRecordingEditor }) => {
seriesRecordingEditor.show(self.SeriesTimerId, options.serverId, {
enableCancel: false

View File

@ -389,13 +389,13 @@ import layoutManager from './layoutManager';
if (xScroller !== yScroller) {
if (xScroller) {
scrollToHelper(xScroller, {left: scrollX, behavior: scrollBehavior});
scrollToHelper(xScroller, { left: scrollX, behavior: scrollBehavior });
}
if (yScroller) {
scrollToHelper(yScroller, {top: scrollY, behavior: scrollBehavior});
scrollToHelper(yScroller, { top: scrollY, behavior: scrollBehavior });
}
} else if (xScroller) {
scrollToHelper(xScroller, {left: scrollX, top: scrollY, behavior: scrollBehavior});
scrollToHelper(xScroller, { left: scrollX, top: scrollY, behavior: scrollBehavior });
}
}
@ -597,7 +597,7 @@ import layoutManager from './layoutManager';
setTimeout(function() {
scrollToElement(e.target, useSmoothScroll());
}, 0);
}, {capture: true});
}, { capture: true });
}
/* eslint-enable indent */

View File

@ -85,8 +85,8 @@ const SearchFields: FunctionComponent<SearchFieldsProps> = ({ onSearch = () => {
dangerouslySetInnerHTML={createInputElement()}
/>
</div>
{layoutManager.tv && !browser.tv &&
<AlphaPicker onAlphaPicked={onAlphaPicked} />
{layoutManager.tv && !browser.tv
&& <AlphaPicker onAlphaPicked={onAlphaPicked} />
}
</div>
);

View File

@ -71,7 +71,7 @@ import toast from './toast/toast';
}
function showProgramDialog(item) {
import('./recordingcreator/recordingcreator').then(({default:recordingCreator}) => {
import('./recordingcreator/recordingcreator').then(({ default:recordingCreator }) => {
recordingCreator.show(item.Id, item.ServerId);
});
}
@ -272,7 +272,7 @@ import toast from './toast/toast';
}
function addToPlaylist(item) {
import('./playlisteditor/playlisteditor').then(({default: playlistEditor}) => {
import('./playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
new playlistEditor().show({
items: [item.Id],
serverId: item.ServerId
@ -297,16 +297,16 @@ import toast from './toast/toast';
if (item.Type === 'Timer') {
if (item.ProgramId) {
import('./recordingcreator/recordingcreator').then(({default: recordingCreator}) => {
import('./recordingcreator/recordingcreator').then(({ default: recordingCreator }) => {
recordingCreator.show(item.ProgramId, currentServerId).then(resolve, reject);
});
} else {
import('./recordingcreator/recordingeditor').then(({default: recordingEditor}) => {
import('./recordingcreator/recordingeditor').then(({ default: recordingEditor }) => {
recordingEditor.show(item.Id, currentServerId).then(resolve, reject);
});
}
} else {
import('./metadataEditor/metadataEditor').then(({default: metadataEditor}) => {
import('./metadataEditor/metadataEditor').then(({ default: metadataEditor }) => {
metadataEditor.show(item.Id, currentServerId).then(resolve, reject);
});
}

View File

@ -342,7 +342,7 @@ function showDownloadOptions(button, context, subtitleId) {
}
function centerFocus(elem, horiz, on) {
import('../../scripts/scrollHelper').then(({default: scrollHelper}) => {
import('../../scripts/scrollHelper').then(({ default: scrollHelper }) => {
const fn = on ? 'on' : 'off';
scrollHelper.centerFocus[fn](elem, horiz);
});
@ -353,7 +353,7 @@ function onOpenUploadMenu(e) {
const selectLanguage = dialog.querySelector('#selectLanguage');
const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
import('../subtitleuploader/subtitleuploader').then(({default: subtitleUploader}) => {
import('../subtitleuploader/subtitleuploader').then(({ default: subtitleUploader }) => {
subtitleUploader.show({
languages: {
list: selectLanguage.innerHTML,

View File

@ -94,9 +94,9 @@ function init(instance) {
subtitleSyncSlider.getBubbleHtml = function (value) {
const newOffset = getOffsetFromPercentage(value);
return '<h1 class="sliderBubbleText">' +
(newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's' +
'</h1>';
return '<h1 class="sliderBubbleText">'
+ (newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's'
+ '</h1>';
};
subtitleSyncCloseButton.addEventListener('click', function () {

View File

@ -48,7 +48,7 @@ function refreshTunerDevices(page, providerInfo, devices) {
function onSelectPathClick(e) {
const page = $(e.target).parents('.xmltvForm')[0];
import('../directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
includeFiles: true,

View File

@ -97,7 +97,7 @@ function dispatchViewEvent(view, eventInfo, eventName, isCancellable) {
return eventResult;
}
function getViewEventDetail(view, {state, url, options = {}}, isRestored) {
function getViewEventDetail(view, { state, url, options = {} }, isRestored) {
const index = url.indexOf('?');
// eslint-disable-next-line compat/compat
const searchParams = new URLSearchParams(url.substring(index + 1));

View File

@ -52,7 +52,7 @@ import { pageIdOn } from '../../utils/dashboard';
}
function showNewKeyPrompt(page) {
import('../../components/prompt/prompt').then(({default: prompt}) => {
import('../../components/prompt/prompt').then(({ default: prompt }) => {
prompt({
title: globalize.translate('HeaderNewApiKey'),
label: globalize.translate('LabelAppName'),

View File

@ -65,7 +65,7 @@ import confirm from '../../components/confirm/confirm';
}
function showSendMessageForm(btn, session) {
import('../../components/prompt/prompt').then(({default: prompt}) => {
import('../../components/prompt/prompt').then(({ default: prompt }) => {
prompt({
title: globalize.translate('HeaderSendMessage'),
label: globalize.translate('LabelMessageText'),
@ -82,7 +82,7 @@ import confirm from '../../components/confirm/confirm';
}
function showOptionsMenu(btn, session) {
import('../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
const menuItems = [];
if (session.ServerId && session.DeviceId !== ServerConnections.deviceId()) {

View File

@ -68,7 +68,7 @@ import confirm from '../../../components/confirm/confirm';
});
}
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
items: menuItems,
positionTo: btn,

View File

@ -239,7 +239,7 @@ import alert from '../../components/alert';
setDecodingCodecsVisible(page, this.value);
});
$('#btnSelectEncoderPath', page).on('click.selectDirectory', function () {
import('../../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
includeFiles: true,
@ -254,7 +254,7 @@ import alert from '../../components/alert';
});
});
$('#btnSelectTranscodingTempPath', page).on('click.selectDirectory', function () {
import('../../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
callback: function (path) {
@ -271,7 +271,7 @@ import alert from '../../components/alert';
});
});
$('#btnSelectFallbackFontPath', page).on('click.selectDirectory', function () {
import('../../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
includeDirectories: true,

View File

@ -60,7 +60,7 @@ import alert from '../../components/alert';
const brandingConfigKey = 'branding';
export default function (view) {
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
import('../../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
callback: function (path) {
@ -77,7 +77,7 @@ import alert from '../../components/alert';
});
});
$('#btnSelectMetadataPath', view).on('click.selectDirectory', function () {
import('../../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
path: $('#txtMetadataPath', view).val(),

View File

@ -15,7 +15,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
/* eslint-disable indent */
function addVirtualFolder(page) {
import('../../components/mediaLibraryCreator/mediaLibraryCreator').then(({default: medialibrarycreator}) => {
import('../../components/mediaLibraryCreator/mediaLibraryCreator').then(({ default: medialibrarycreator }) => {
new medialibrarycreator({
collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
return !f.hidden;
@ -30,7 +30,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
}
function editVirtualFolder(page, virtualFolder) {
import('../../components/mediaLibraryEditor/mediaLibraryEditor').then(({default: medialibraryeditor}) => {
import('../../components/mediaLibraryEditor/mediaLibraryEditor').then(({ default: medialibraryeditor }) => {
new medialibraryeditor({
refresh: shouldRefreshLibraryAfterChanges(page),
library: virtualFolder
@ -64,7 +64,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
}
function refreshVirtualFolder(page, virtualFolder) {
import('../../components/refreshdialog/refreshdialog').then(({default: refreshDialog}) => {
import('../../components/refreshdialog/refreshdialog').then(({ default: refreshDialog }) => {
new refreshDialog({
itemIds: [virtualFolder.ItemId],
serverId: ApiClient.serverId(),
@ -74,7 +74,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
}
function renameVirtualFolder(page, virtualFolder) {
import('../../components/prompt/prompt').then(({default: prompt}) => {
import('../../components/prompt/prompt').then(({ default: prompt }) => {
prompt({
label: globalize.translate('LabelNewName'),
description: globalize.translate('MessageRenameMediaFolder'),

View File

@ -181,7 +181,7 @@ import alert from '../../components/alert';
}
});
view.querySelector('#btnSelectCertPath').addEventListener('click', function () {
import('../../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
includeFiles: true,

View File

@ -349,7 +349,7 @@ import LibraryMenu from '../scripts/libraryMenu';
function showViewSettingsMenu() {
const instance = this;
import('../components/viewSettings/viewSettings').then(({default: ViewSettings}) => {
import('../components/viewSettings/viewSettings').then(({ default: ViewSettings }) => {
new ViewSettings().show({
settingsKey: instance.getSettingsKey(),
settings: instance.getViewSettings(),
@ -364,7 +364,7 @@ import LibraryMenu from '../scripts/libraryMenu';
function showFilterMenu() {
const instance = this;
import('../components/filtermenu/filtermenu').then(({default: FilterMenu}) => {
import('../components/filtermenu/filtermenu').then(({ default: FilterMenu }) => {
new FilterMenu().show({
settingsKey: instance.getSettingsKey(),
settings: instance.getFilters(),
@ -383,7 +383,7 @@ import LibraryMenu from '../scripts/libraryMenu';
function showSortMenu() {
const instance = this;
import('../components/sortmenu/sortmenu').then(({default: SortMenu}) => {
import('../components/sortmenu/sortmenu').then(({ default: SortMenu }) => {
new SortMenu().show({
settingsKey: instance.getSettingsKey(),
settings: instance.getSortValues(),
@ -401,7 +401,7 @@ import LibraryMenu from '../scripts/libraryMenu';
function onNewItemClick() {
const instance = this;
import('../components/playlisteditor/playlisteditor').then(({default: playlistEditor}) => {
import('../components/playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
new playlistEditor({
items: [],
serverId: instance.params.serverId
@ -772,7 +772,7 @@ class ItemsView {
}
function autoFocus() {
import('../components/autoFocuser').then(({default: autoFocuser}) => {
import('../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(view);
});
}

View File

@ -100,7 +100,7 @@ export default function (view, params, tabContent) {
}
function showFilterMenu(context) {
import('../../components/filterdialog/filterdialog').then(({default: FilterDialog}) => {
import('../../components/filterdialog/filterdialog').then(({ default: FilterDialog }) => {
const filterDialog = new FilterDialog({
query: getQuery(),
mode: 'livetvchannels',
@ -124,7 +124,7 @@ export default function (view, params, tabContent) {
loading.hide();
isLoading = false;
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(context);
});
});

View File

@ -61,7 +61,7 @@ function loadRecommendedPrograms(page) {
});
loading.hide();
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
});
@ -273,7 +273,7 @@ export default function (view, params) {
break;
}
import(`../livetv/${depends}`).then(({default: controllerFactory}) => {
import(`../livetv/${depends}`).then(({ default: controllerFactory }) => {
let tabContent;
if (index === 0) {

View File

@ -9,7 +9,7 @@ function onListingsSubmitted() {
}
function init(page, type, providerId) {
import(`../components/tvproviders/${type}`).then(({default: factory}) => {
import(`../components/tvproviders/${type}`).then(({ default: factory }) => {
const instance = new factory(page, providerId, {});
Events.on(instance, 'submitted', onListingsSubmitted);
instance.init();
@ -17,7 +17,7 @@ function init(page, type, providerId) {
}
function loadTemplate(page, type, providerId) {
import(`../components/tvproviders/${type}.template.html`).then(({default: html}) => {
import(`../components/tvproviders/${type}.template.html`).then(({ default: html }) => {
page.querySelector('.providerTemplate').innerHTML = globalize.translateHtml(html);
init(page, type, providerId);
});

View File

@ -64,7 +64,7 @@ $(document).on('pageinit', '#liveTvSettingsPage', function () {
const page = this;
$('.liveTvSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
$('#btnSelectRecordingPath', page).on('click.selectDirectory', function () {
import('../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
callback: function (path) {
@ -79,7 +79,7 @@ $(document).on('pageinit', '#liveTvSettingsPage', function () {
});
});
$('#btnSelectMovieRecordingPath', page).on('click.selectDirectory', function () {
import('../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
callback: function (path) {
@ -94,7 +94,7 @@ $(document).on('pageinit', '#liveTvSettingsPage', function () {
});
});
$('#btnSelectSeriesRecordingPath', page).on('click.selectDirectory', function () {
import('../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
callback: function (path) {
@ -109,7 +109,7 @@ $(document).on('pageinit', '#liveTvSettingsPage', function () {
});
});
$('#btnSelectPostProcessorPath', page).on('click.selectDirectory', function () {
import('../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
includeFiles: true,

View File

@ -147,7 +147,7 @@ function showProviderOptions(page, providerId, button) {
id: 'map'
});
import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
items: items,
positionTo: button
@ -165,7 +165,7 @@ function showProviderOptions(page, providerId, button) {
}
function mapChannels(page, providerId) {
import('../components/channelMapper/channelMapper').then(({default: channelMapper}) => {
import('../components/channelMapper/channelMapper').then(({ default: channelMapper }) => {
new channelMapper({
serverId: ApiClient.serverInfo().Id,
providerId: providerId
@ -237,7 +237,7 @@ function addProvider(button) {
id: 'xmltv'
});
import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
items: menuItems,
positionTo: button,
@ -263,7 +263,7 @@ function showDeviceMenu(button, tunerDeviceId) {
id: 'edit'
});
import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
items: items,
positionTo: button

View File

@ -106,7 +106,7 @@ function submitForm(page) {
}
function getDetectedDevice() {
return import('../components/tunerPicker').then(({default: tunerPicker}) => {
return import('../components/tunerPicker').then(({ default: tunerPicker }) => {
return new tunerPicker().show({
serverId: ApiClient.serverId()
});
@ -222,7 +222,7 @@ export default function (view, params) {
});
});
view.querySelector('.btnSelectPath').addEventListener('click', function () {
import('../components/directorybrowser/directorybrowser').then(({default: DirectoryBrowser}) => {
import('../components/directorybrowser/directorybrowser').then(({ default: DirectoryBrowser }) => {
const picker = new DirectoryBrowser();
picker.show({
includeFiles: true,

View File

@ -180,7 +180,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
loading.hide();
isLoading = false;
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(tabContent);
});
});
@ -191,7 +191,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
let isLoading = false;
this.showFilterMenu = function () {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
const filterDialog = new filterDialogFactory({
query: getQuery(),
mode: 'albums',

View File

@ -162,7 +162,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
loading.hide();
isLoading = false;
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(tabContent);
});
});
@ -172,7 +172,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
let isLoading = false;
this.showFilterMenu = function () {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: this.mode,

View File

@ -92,7 +92,7 @@ import loading from '../../components/loading/loading';
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
loading.hide();
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(context);
});
});

View File

@ -63,7 +63,7 @@ import loading from '../../components/loading/loading';
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
loading.hide();
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(context);
});
});

View File

@ -75,7 +75,7 @@ import Dashboard from '../../utils/dashboard';
imageLoader.lazyChildren(elem);
loading.hide();
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
});
@ -171,7 +171,7 @@ import Dashboard from '../../utils/dashboard';
loadRecentlyPlayed(tabContent, parentId);
loadFrequentlyPlayed(tabContent, parentId);
import('../../components/favoriteitems').then(({default: favoriteItems}) => {
import('../../components/favoriteitems').then(({ default: favoriteItems }) => {
favoriteItems.render(tabContent, ApiClient.getCurrentUserId(), parentId, ['favoriteArtists', 'favoriteAlbums', 'favoriteSongs']);
});
}
@ -290,7 +290,7 @@ import Dashboard from '../../utils/dashboard';
break;
}
import(`../music/${depends}`).then(({default: controllerFactory}) => {
import(`../music/${depends}`).then(({ default: controllerFactory }) => {
let tabContent;
if (index == 1) {

View File

@ -124,7 +124,7 @@ export default function (view, params, tabContent) {
loading.hide();
isLoading = false;
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
});
@ -135,7 +135,7 @@ export default function (view, params, tabContent) {
let isLoading = false;
self.showFilterMenu = function () {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: 'songs',

View File

@ -64,7 +64,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
ServerConnections.getApiClient(item.ServerId).getCurrentUser().then(function (user) {
if (user.Policy.EnableLiveTvManagement) {
import('../../../components/recordingcreator/recordingbutton').then(({default: RecordingButton}) => {
import('../../../components/recordingcreator/recordingbutton').then(({ default: RecordingButton }) => {
if (recordingButtonManager) {
recordingButtonManager.refreshItem(item);
return;
@ -216,7 +216,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
let title = itemName;
if (item.PremiereDate) {
try {
const year = datetime.toLocaleString(datetime.parseISO8601Date(item.PremiereDate).getFullYear(), {useGrouping: false});
const year = datetime.toLocaleString(datetime.parseISO8601Date(item.PremiereDate).getFullYear(), { useGrouping: false });
title += ` (${year})`;
} catch (e) {
console.error(e);
@ -622,7 +622,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
}
function showComingUpNext(player) {
import('../../../components/upnextdialog/upnextdialog').then(({default: UpNextDialog}) => {
import('../../../components/upnextdialog/upnextdialog').then(({ default: UpNextDialog }) => {
if (!(currentVisibleMenu || currentUpNextDialog)) {
currentVisibleMenu = 'upnext';
comingUpNextDisplayed = true;
@ -896,8 +896,8 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
const state = playbackManager.getPlayerState(player);
// show subtitle offset feature only if player and media support it
const showSubOffset = playbackManager.supportSubtitleOffset(player) &&
playbackManager.canHandleOffsetOnCurrentSubtitle(player);
const showSubOffset = playbackManager.supportSubtitleOffset(player)
&& playbackManager.canHandleOffsetOnCurrentSubtitle(player);
playerSettingsMenu.show({
mediaType: 'Video',
@ -929,7 +929,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
}
function toggleStats() {
import('../../../components/playerstats/playerstats').then(({default: PlayerStats}) => {
import('../../../components/playerstats/playerstats').then(({ default: PlayerStats }) => {
const player = currentPlayer;
if (player) {
@ -969,7 +969,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
});
const positionTo = this;
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
items: menuItems,
title: globalize.translate('Audio'),
@ -1086,7 +1086,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
const positionTo = this;
import('../../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../../../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
title: globalize.translate('Subtitles'),
items: menuItems,

View File

@ -54,7 +54,7 @@ import { ConnectionState } from '../../../utils/jellyfin-apiclient/ConnectionSta
view.querySelector('.addServerForm').addEventListener('submit', onServerSubmit);
view.querySelector('.btnCancel').addEventListener('click', goBack);
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(view);
});
@ -65,7 +65,7 @@ import { ConnectionState } from '../../../utils/jellyfin-apiclient/ConnectionSta
}
function goBack() {
import('../../../components/appRouter').then(({appRouter}) => {
import('../../../components/appRouter').then(({ appRouter }) => {
appRouter.back();
});
}

View File

@ -201,7 +201,7 @@ import './login.scss';
view.querySelector('.manualLoginForm').classList.add('hide');
view.querySelector('.btnManual').classList.remove('hide');
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(view);
});
}

View File

@ -162,7 +162,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
loading.hide();
isLoading = false;
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
});
@ -173,7 +173,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
let isLoading = false;
self.showFilterMenu = function () {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: 'episodes',

View File

@ -269,7 +269,7 @@ import autoFocuser from '../../components/autoFocuser';
break;
}
import(`../shows/${depends}`).then(({default: controllerFactory}) => {
import(`../shows/${depends}`).then(({ default: controllerFactory }) => {
let tabContent;
if (index === 1) {

View File

@ -191,7 +191,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
loading.hide();
isLoading = false;
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
});
@ -201,7 +201,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
let isLoading = false;
this.showFilterMenu = function () {
import('../../components/filterdialog/filterdialog').then(({default: filterDialogFactory}) => {
import('../../components/filterdialog/filterdialog').then(({ default: filterDialogFactory }) => {
const filterDialog = new filterDialogFactory({
query: getQuery(tabContent),
mode: 'series',

View File

@ -50,7 +50,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
});
loading.hide();
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(context);
});
});

View File

@ -21,7 +21,7 @@ export default function (view) {
view.querySelector('form').addEventListener('submit', submit);
view.querySelector('.btnSave').classList.remove('hide');
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(view);
});
});

View File

@ -68,7 +68,7 @@ export default function (view, params) {
page.querySelector('.lnkControlsPreferences').classList.add('hide');
}
import('../../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(view);
});
});

View File

@ -13,7 +13,7 @@ type IProps = {
isLinkVisible?: boolean;
url?: string;
}
const SectionTitleContainer: FunctionComponent<IProps> = ({SectionClassName, title, isBtnVisible = false, btnId, btnClassName, btnTitle, btnIcon, isLinkVisible = true, url}: IProps) => {
const SectionTitleContainer: FunctionComponent<IProps> = ({ SectionClassName, title, isBtnVisible = false, btnId, btnClassName, btnTitle, btnIcon, isLinkVisible = true, url }: IProps) => {
return (
<div className={`${SectionClassName} sectionTitleContainer flex align-items-center`}>
<h2 className='sectionTitle'>

View File

@ -72,7 +72,7 @@ import Sortable from 'sortablejs';
}
const self = this;
import('../../components/multiSelect/multiSelect').then(({default: MultiSelect}) => {
import('../../components/multiSelect/multiSelect').then(({ default: MultiSelect }) => {
self.multiSelect = new MultiSelect({
container: self,
bindOnClick: false

View File

@ -229,8 +229,8 @@ const Scroller: FC<ScrollerProps> = ({
return (
<>
{
showControls && scrollState.scrollWidth > scrollState.scrollSize + 20 &&
<ScrollButtons
showControls && scrollState.scrollWidth > scrollState.scrollSize + 20
&& <ScrollButtons
scrollRef={scrollRef}
scrollerFactoryRef={scrollerFactoryRef}
scrollState={scrollState}

View File

@ -25,7 +25,7 @@ class BackdropScreensaver {
const apiClient = ServerConnections.currentApiClient();
apiClient.getItems(apiClient.getCurrentUserId(), query).then((result) => {
if (result.Items.length) {
import('../../components/slideshow/slideshow').then(({default: Slideshow}) => {
import('../../components/slideshow/slideshow').then(({ default: Slideshow }) => {
const newSlideShow = new Slideshow({
showTitle: true,
cover: true,

View File

@ -23,8 +23,8 @@ export default class TableOfContents {
bindEvents() {
const elem = this.elem;
elem.addEventListener('close', this.onDialogClosed, {once: true});
elem.querySelector('.btnBookplayerTocClose').addEventListener('click', this.onDialogClosed, {once: true});
elem.addEventListener('close', this.onDialogClosed, { once: true });
elem.querySelector('.btnBookplayerTocClose').addEventListener('click', this.onDialogClosed, { once: true });
}
unbindEvents() {

View File

@ -107,7 +107,7 @@ function tryRemoveElement(elem) {
}
function requireHlsPlayer(callback) {
import('hls.js').then(({default: hls}) => {
import('hls.js').then(({ default: hls }) => {
hls.DefaultConfig.lowLatencyMode = false;
hls.DefaultConfig.backBufferLength = Infinity;
hls.DefaultConfig.liveBackBufferLength = 90;
@ -396,7 +396,7 @@ function tryRemoveElement(elem) {
* @private
*/
setSrcWithFlvJs(elem, options, url) {
return import('flv.js').then(({default: flvjs}) => {
return import('flv.js').then(({ default: flvjs }) => {
const flvPlayer = flvjs.createPlayer({
type: 'flv',
url: url
@ -1296,7 +1296,7 @@ function tryRemoveElement(elem) {
resizeVariation: 0.2,
renderAhead: 90
};
import('@jellyfin/libass-wasm').then(({default: SubtitlesOctopus}) => {
import('@jellyfin/libass-wasm').then(({ default: SubtitlesOctopus }) => {
Promise.all([
apiClient.getNamedConfiguration('encoding'),
// Worker in Tizen 5 doesn't resolve relative path with async request

View File

@ -11,7 +11,7 @@ export default class PhotoPlayer {
play(options) {
return new Promise(function (resolve) {
import('../../components/slideshow/slideshow').then(({default: Slideshow}) => {
import('../../components/slideshow/slideshow').then(({ default: Slideshow }) => {
const index = options.startIndex || 0;
const apiClient = ServerConnections.currentApiClient();

View File

@ -133,9 +133,9 @@ class PlaybackCore {
*/
async sendBufferingRequest(isBuffering = true) {
const playerWrapper = this.manager.getPlayerWrapper();
const currentPosition = (playerWrapper.currentTimeAsync
? await playerWrapper.currentTimeAsync()
: playerWrapper.currentTime());
const currentPosition = (playerWrapper.currentTimeAsync ?
await playerWrapper.currentTimeAsync() :
playerWrapper.currentTime());
const currentPositionTicks = Math.round(currentPosition * Helper.TicksPerMillisecond);
const isPlaying = playerWrapper.isPlaying();
@ -172,11 +172,11 @@ class PlaybackCore {
*/
async applyCommand(command) {
// Check if duplicate.
if (this.lastCommand &&
this.lastCommand.When.getTime() === command.When.getTime() &&
this.lastCommand.PositionTicks === command.PositionTicks &&
this.lastCommand.Command === command.Command &&
this.lastCommand.PlaylistItemId === command.PlaylistItemId
if (this.lastCommand
&& this.lastCommand.When.getTime() === command.When.getTime()
&& this.lastCommand.PositionTicks === command.PositionTicks
&& this.lastCommand.Command === command.Command
&& this.lastCommand.PlaylistItemId === command.PlaylistItemId
) {
// Duplicate command found, check playback state and correct if needed.
console.debug('SyncPlay applyCommand: duplicate command received!', command);
@ -192,9 +192,9 @@ class PlaybackCore {
} else {
// Check if playback state matches requested command.
const playerWrapper = this.manager.getPlayerWrapper();
const currentPositionTicks = Math.round((playerWrapper.currentTimeAsync
? await playerWrapper.currentTimeAsync()
: playerWrapper.currentTime()) * Helper.TicksPerMillisecond);
const currentPositionTicks = Math.round((playerWrapper.currentTimeAsync ?
await playerWrapper.currentTimeAsync() :
playerWrapper.currentTime()) * Helper.TicksPerMillisecond);
const isPlaying = playerWrapper.isPlaying();
switch (command.Command) {
@ -279,9 +279,9 @@ class PlaybackCore {
const playAtTimeLocal = this.timeSyncCore.remoteDateToLocal(playAtTime);
const playerWrapper = this.manager.getPlayerWrapper();
const currentPositionTicks = (playerWrapper.currentTimeAsync
? await playerWrapper.currentTimeAsync()
: playerWrapper.currentTime()) * Helper.TicksPerMillisecond;
const currentPositionTicks = (playerWrapper.currentTimeAsync ?
await playerWrapper.currentTimeAsync() :
playerWrapper.currentTime()) * Helper.TicksPerMillisecond;
if (playAtTimeLocal > currentTime) {
const playTimeout = playAtTimeLocal - currentTime;

View File

@ -174,9 +174,9 @@ class QueueCore {
const currentTime = new Date();
const now = this.manager.timeSyncCore.localDateToRemote(currentTime);
const currentPosition = (playerWrapper.currentTimeAsync
? await playerWrapper.currentTimeAsync()
: playerWrapper.currentTime());
const currentPosition = (playerWrapper.currentTimeAsync ?
await playerWrapper.currentTimeAsync() :
playerWrapper.currentTime());
const currentPositionTicks = Math.round(currentPosition * Helper.TicksPerMillisecond);
const isPlaying = playerWrapper.isPlaying();

View File

@ -9,7 +9,7 @@ import RecommendationContainer from '../../components/common/RecommendationConta
import SectionContainer from '../../components/common/SectionContainer';
import { LibraryViewProps } from '../../types/interface';
const SuggestionsView: FC<LibraryViewProps> = ({topParentId}) => {
const SuggestionsView: FC<LibraryViewProps> = ({ topParentId }) => {
const [ latestItems, setLatestItems ] = useState<BaseItemDto[]>([]);
const [ resumeResult, setResumeResult ] = useState<BaseItemDtoQueryResult>({});
const [ recommendations, setRecommendations ] = useState<RecommendationDto[]>([]);
@ -28,7 +28,7 @@ const SuggestionsView: FC<LibraryViewProps> = ({topParentId}) => {
}, [enableScrollX]);
const autoFocus = useCallback((page) => {
import('../../components/autoFocuser').then(({default: autoFocuser}) => {
import('../../components/autoFocuser').then(({ default: autoFocuser }) => {
autoFocuser.autoFocus(page);
});
}, []);

View File

@ -19,8 +19,8 @@ const Search: FunctionComponent = () => {
className='mainAnimatedPage libraryPage allLibraryPage noSecondaryNavPage'
>
<SearchFields onSearch={setQuery} />
{!query &&
<SearchSuggestions
{!query
&& <SearchSuggestions
parentId={searchParams.get('parentId')}
/>
}

View File

@ -172,7 +172,7 @@ const UserEdit: FunctionComponent = () => {
(page.querySelector('.chkForceRemoteSourceTranscoding') as HTMLInputElement).checked = user.Policy.ForceRemoteSourceTranscoding;
(page.querySelector('.chkRemoteAccess') as HTMLInputElement).checked = user.Policy.EnableRemoteAccess == null || user.Policy.EnableRemoteAccess;
(page.querySelector('#txtRemoteClientBitrateLimit') as HTMLInputElement).value = user.Policy.RemoteClientBitrateLimit > 0 ?
(user.Policy.RemoteClientBitrateLimit / 1e6).toLocaleString(undefined, {maximumFractionDigits: 6}) : '';
(user.Policy.RemoteClientBitrateLimit / 1e6).toLocaleString(undefined, { maximumFractionDigits: 6 }) : '';
(page.querySelector('#txtLoginAttemptsBeforeLockout') as HTMLInputElement).value = user.Policy.LoginAttemptsBeforeLockout || '0';
(page.querySelector('#txtMaxActiveSessions') as HTMLInputElement).value = user.Policy.MaxActiveSessions || '0';
if (window.ApiClient.isMinServerVersion('10.6.0')) {
@ -314,7 +314,7 @@ const UserEdit: FunctionComponent = () => {
<SectionTabs activeTab='useredit'/>
<div
className='lnkEditUserPreferencesContainer'
style={{paddingBottom: '1em'}}
style={{ paddingBottom: '1em' }}
>
<LinkEditUserPreferences
className= 'lnkEditUserPreferences button-link'
@ -327,7 +327,7 @@ const UserEdit: FunctionComponent = () => {
<div>
{globalize.translate('HeaderThisUserIsCurrentlyDisabled')}
</div>
<div style={{marginTop: 5}}>
<div style={{ marginTop: 5 }}>
{globalize.translate('MessageReenableUser')}
</div>
</div>
@ -386,7 +386,7 @@ const UserEdit: FunctionComponent = () => {
<h2 className='paperListLabel'>
{globalize.translate('HeaderFeatureAccess')}
</h2>
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
<div className='checkboxList paperList' style={{ padding: '.5em 1em' }}>
<CheckBoxElement
className='chkEnableLiveTvAccess'
title='OptionAllowBrowsingLiveTv'
@ -401,7 +401,7 @@ const UserEdit: FunctionComponent = () => {
<h2 className='paperListLabel'>
{globalize.translate('HeaderPlayback')}
</h2>
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
<div className='checkboxList paperList' style={{ padding: '.5em 1em' }}>
<CheckBoxElement
className='chkEnableMediaPlayback'
title='OptionAllowMediaPlayback'
@ -458,7 +458,7 @@ const UserEdit: FunctionComponent = () => {
</div>
</div>
<div className='verticalSection'>
<h2 className='checkboxListLabel' style={{marginBottom: '1em'}}>
<h2 className='checkboxListLabel' style={{ marginBottom: '1em' }}>
{globalize.translate('HeaderAllowMediaDeletionFrom')}
</h2>
<div className='checkboxList paperList checkboxList-paperList'>
@ -484,7 +484,7 @@ const UserEdit: FunctionComponent = () => {
<h2 className='checkboxListLabel'>
{globalize.translate('HeaderRemoteControl')}
</h2>
<div className='checkboxList paperList' style={{padding: '.5em 1em'}}>
<div className='checkboxList paperList' style={{ padding: '.5em 1em' }}>
<CheckBoxElement
className='chkEnableRemoteControlOtherUsers'
title='OptionAllowRemoteControlOthers'

View File

@ -239,7 +239,7 @@ const UserParentalControl: FunctionComponent = () => {
const showSchedulePopup = (schedule: AccessSchedule, index: number) => {
schedule = schedule || {};
import('../../components/accessSchedule/accessSchedule').then(({default: accessschedule}) => {
import('../../components/accessSchedule/accessSchedule').then(({ default: accessschedule }) => {
accessschedule.show({
schedule: schedule
}).then(function (updatedSchedule) {
@ -272,7 +272,7 @@ const UserParentalControl: FunctionComponent = () => {
};
const showBlockedTagPopup = () => {
import('../../components/prompt/prompt').then(({default: prompt}) => {
import('../../components/prompt/prompt').then(({ default: prompt }) => {
prompt({
label: globalize.translate('LabelTag')
}).then(function (value) {
@ -367,7 +367,7 @@ const UserParentalControl: FunctionComponent = () => {
</div>
</div>
<br />
<div className='verticalSection' style={{marginBottom: '2em'}}>
<div className='verticalSection' style={{ marginBottom: '2em' }}>
<SectionTitleContainer
SectionClassName='detailSectionHeader'
title={globalize.translate('LabelBlockContentWithTags')}
@ -378,7 +378,7 @@ const UserParentalControl: FunctionComponent = () => {
btnIcon='add'
isLinkVisible={false}
/>
<div className='blockedTags' style={{marginTop: '.5em'}}>
<div className='blockedTags' style={{ marginTop: '.5em' }}>
{blockedTags.map(tag => {
return <BlockedTagList
key={tag}
@ -387,7 +387,7 @@ const UserParentalControl: FunctionComponent = () => {
})}
</div>
</div>
<div className='accessScheduleSection verticalSection' style={{marginBottom: '2em'}}>
<div className='accessScheduleSection verticalSection' style={{ marginBottom: '2em' }}>
<SectionTitleContainer
title={globalize.translate('HeaderAccessSchedule')}
isBtnVisible={true}

View File

@ -153,25 +153,25 @@ const UserProfile: FunctionComponent = () => {
<div ref={element} className='padded-left padded-right padded-bottom-page'>
<div
className='readOnlyContent'
style={{margin: '0 auto', marginBottom: '1.8em', padding: '0 1em', display: 'flex', flexDirection: 'row', alignItems: 'center'}}
style={{ margin: '0 auto', marginBottom: '1.8em', padding: '0 1em', display: 'flex', flexDirection: 'row', alignItems: 'center' }}
>
<div
className='imagePlaceHolder'
style={{position: 'relative', display: 'inline-block', maxWidth: 200 }}
style={{ position: 'relative', display: 'inline-block', maxWidth: 200 }}
>
<input
id='uploadImage'
type='file'
accept='image/*'
style={{position: 'absolute', right: 0, width: '100%', height: '100%', opacity: 0, cursor: 'pointer'}}
style={{ position: 'absolute', right: 0, width: '100%', height: '100%', opacity: 0, cursor: 'pointer' }}
/>
<div
id='image'
style={{width: 200, height: 200, backgroundRepeat: 'no-repeat', backgroundPosition: 'center', borderRadius: '100%', backgroundSize: 'cover'}}
style={{ width: 200, height: 200, backgroundRepeat: 'no-repeat', backgroundPosition: 'center', borderRadius: '100%', backgroundSize: 'cover' }}
/>
</div>
<div style={{verticalAlign: 'top', margin: '1em 2em', display: 'flex', flexDirection: 'column', alignItems: 'center'}}>
<h2 className='username' style={{margin: 0, fontSize: 'xx-large'}}>
<div style={{ verticalAlign: 'top', margin: '1em 2em', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
<h2 className='username' style={{ margin: 0, fontSize: 'xx-large' }}>
{userName}
</h2>
<br />

View File

@ -1,5 +1,5 @@
import type { UserDto } from '@jellyfin/sdk/lib/generated-client';
import React, {FunctionComponent, useEffect, useState, useRef} from 'react';
import React, { FunctionComponent, useEffect, useState, useRef } from 'react';
import Dashboard from '../../utils/dashboard';
import globalize from '../../scripts/globalize';
import loading from '../../components/loading/loading';
@ -75,7 +75,7 @@ const UserProfiles: FunctionComponent = () => {
icon: 'delete'
});
import('../../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
items: menuItems,
positionTo: card,

View File

@ -187,25 +187,25 @@ function supportsCssAnimation(allowPrefix) {
const uaMatch = function (ua) {
ua = ua.toLowerCase();
const match = /(edg)[ /]([\w.]+)/.exec(ua) ||
/(edga)[ /]([\w.]+)/.exec(ua) ||
/(edgios)[ /]([\w.]+)/.exec(ua) ||
/(edge)[ /]([\w.]+)/.exec(ua) ||
/(opera)[ /]([\w.]+)/.exec(ua) ||
/(opr)[ /]([\w.]+)/.exec(ua) ||
/(chrome)[ /]([\w.]+)/.exec(ua) ||
/(safari)[ /]([\w.]+)/.exec(ua) ||
/(firefox)[ /]([\w.]+)/.exec(ua) ||
ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
const match = /(edg)[ /]([\w.]+)/.exec(ua)
|| /(edga)[ /]([\w.]+)/.exec(ua)
|| /(edgios)[ /]([\w.]+)/.exec(ua)
|| /(edge)[ /]([\w.]+)/.exec(ua)
|| /(opera)[ /]([\w.]+)/.exec(ua)
|| /(opr)[ /]([\w.]+)/.exec(ua)
|| /(chrome)[ /]([\w.]+)/.exec(ua)
|| /(safari)[ /]([\w.]+)/.exec(ua)
|| /(firefox)[ /]([\w.]+)/.exec(ua)
|| ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)
|| [];
const versionMatch = /(version)[ /]([\w.]+)/.exec(ua);
let platform_match = /(ipad)/.exec(ua) ||
/(iphone)/.exec(ua) ||
/(windows)/.exec(ua) ||
/(android)/.exec(ua) ||
[];
let platform_match = /(ipad)/.exec(ua)
|| /(iphone)/.exec(ua)
|| /(windows)/.exec(ua)
|| /(android)/.exec(ua)
|| [];
let browser = match[1] || '';

View File

@ -17,11 +17,11 @@ import browser from './browser';
}
// hevc main level 4.0
return !!videoTestElement.canPlayType &&
(videoTestElement.canPlayType('video/mp4; codecs="hvc1.1.L120"').replace(/no/, '') ||
videoTestElement.canPlayType('video/mp4; codecs="hev1.1.L120"').replace(/no/, '') ||
videoTestElement.canPlayType('video/mp4; codecs="hvc1.1.0.L120"').replace(/no/, '') ||
videoTestElement.canPlayType('video/mp4; codecs="hev1.1.0.L120"').replace(/no/, ''));
return !!videoTestElement.canPlayType
&& (videoTestElement.canPlayType('video/mp4; codecs="hvc1.1.L120"').replace(/no/, '')
|| videoTestElement.canPlayType('video/mp4; codecs="hev1.1.L120"').replace(/no/, '')
|| videoTestElement.canPlayType('video/mp4; codecs="hvc1.1.0.L120"').replace(/no/, '')
|| videoTestElement.canPlayType('video/mp4; codecs="hev1.1.0.L120"').replace(/no/, ''));
}
let _supportsTextTracks;
@ -53,8 +53,8 @@ import browser from './browser';
}
const media = document.createElement('video');
return !!(media.canPlayType('application/x-mpegURL').replace(/no/, '') ||
media.canPlayType('application/vnd.apple.mpegURL').replace(/no/, ''));
return !!(media.canPlayType('application/x-mpegURL').replace(/no/, '')
|| media.canPlayType('application/vnd.apple.mpegURL').replace(/no/, ''));
}
function canPlayHlsWithMSE() {
@ -96,8 +96,8 @@ import browser from './browser';
}
if (videoTestElement.canPlayType) {
return videoTestElement.canPlayType('application/x-mpegurl; codecs="avc1.42E01E, ac-3"').replace(/no/, '') ||
videoTestElement.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.42E01E, ac-3"').replace(/no/, '');
return videoTestElement.canPlayType('application/x-mpegurl; codecs="avc1.42E01E, ac-3"').replace(/no/, '')
|| videoTestElement.canPlayType('application/vnd.apple.mpegURL; codecs="avc1.42E01E, ac-3"').replace(/no/, '');
}
return false;
@ -146,8 +146,8 @@ import browser from './browser';
return true;
}
if (videoTestElement.canPlayType('video/x-matroska').replace(/no/, '') ||
videoTestElement.canPlayType('video/mkv').replace(/no/, '')) {
if (videoTestElement.canPlayType('video/x-matroska').replace(/no/, '')
|| videoTestElement.canPlayType('video/mkv').replace(/no/, '')) {
return true;
}
@ -815,19 +815,19 @@ export function canPlaySecondaryAudio(videoTestElement) {
let maxH264Level = 42;
let h264Profiles = 'high|main|baseline|constrained baseline';
if (browser.tizen || browser.web0s ||
videoTestElement.canPlayType('video/mp4; codecs="avc1.640833"').replace(/no/, '')) {
if (browser.tizen || browser.web0s
|| videoTestElement.canPlayType('video/mp4; codecs="avc1.640833"').replace(/no/, '')) {
maxH264Level = 51;
}
// Support H264 Level 52 (Tizen 5.0) - app only
if ((browser.tizenVersion >= 5 && window.NativeShell) ||
videoTestElement.canPlayType('video/mp4; codecs="avc1.640834"').replace(/no/, '')) {
if ((browser.tizenVersion >= 5 && window.NativeShell)
|| videoTestElement.canPlayType('video/mp4; codecs="avc1.640834"').replace(/no/, '')) {
maxH264Level = 52;
}
if ((browser.tizen ||
videoTestElement.canPlayType('video/mp4; codecs="avc1.6e0033"').replace(/no/, ''))
if ((browser.tizen
|| videoTestElement.canPlayType('video/mp4; codecs="avc1.6e0033"').replace(/no/, ''))
// These tests are passing in safari, but playback is failing
&& !browser.safari && !browser.iOS && !browser.web0s && !browser.edge && !browser.mobile
) {
@ -838,28 +838,28 @@ export function canPlaySecondaryAudio(videoTestElement) {
let hevcProfiles = 'main';
// hevc main level 4.1
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.1.4.L123"').replace(/no/, '') ||
videoTestElement.canPlayType('video/mp4; codecs="hev1.1.4.L123"').replace(/no/, '')) {
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.1.4.L123"').replace(/no/, '')
|| videoTestElement.canPlayType('video/mp4; codecs="hev1.1.4.L123"').replace(/no/, '')) {
maxHevcLevel = 123;
}
// hevc main10 level 4.1
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.2.4.L123"').replace(/no/, '') ||
videoTestElement.canPlayType('video/mp4; codecs="hev1.2.4.L123"').replace(/no/, '')) {
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.2.4.L123"').replace(/no/, '')
|| videoTestElement.canPlayType('video/mp4; codecs="hev1.2.4.L123"').replace(/no/, '')) {
maxHevcLevel = 123;
hevcProfiles = 'main|main 10';
}
// hevc main10 level 5.1
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.2.4.L153"').replace(/no/, '') ||
videoTestElement.canPlayType('video/mp4; codecs="hev1.2.4.L153"').replace(/no/, '')) {
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.2.4.L153"').replace(/no/, '')
|| videoTestElement.canPlayType('video/mp4; codecs="hev1.2.4.L153"').replace(/no/, '')) {
maxHevcLevel = 153;
hevcProfiles = 'main|main 10';
}
// hevc main10 level 6.1
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.2.4.L183"').replace(/no/, '') ||
videoTestElement.canPlayType('video/mp4; codecs="hev1.2.4.L183"').replace(/no/, '')) {
if (videoTestElement.canPlayType('video/mp4; codecs="hvc1.2.4.L183"').replace(/no/, '')
|| videoTestElement.canPlayType('video/mp4; codecs="hev1.2.4.L183"').replace(/no/, '')) {
maxHevcLevel = 183;
hevcProfiles = 'main|main 10';
}

View File

@ -55,7 +55,7 @@ export function showLayoutMenu (button, currentLayout, views) {
};
});
import('../components/actionSheet/actionSheet').then(({default: actionsheet}) => {
import('../components/actionSheet/actionSheet').then(({ default: actionsheet }) => {
actionsheet.show({
items: menuItems,
positionTo: button,
@ -122,7 +122,7 @@ export function showSortMenu (options) {
Promise.all([
import('../components/dialogHelper/dialogHelper'),
import('../elements/emby-radio/emby-radio')
]).then(([{default: dialogHelper}]) => {
]).then(([{ default: dialogHelper }]) => {
function onSortByChange() {
const newValue = this.value;

View File

@ -189,7 +189,7 @@ export default function (view) {
reloadItems();
});
view.querySelector('.btnNewPlaylist').addEventListener('click', function () {
import('../components/playlisteditor/playlisteditor').then(({default: playlistEditor}) => {
import('../components/playlisteditor/playlisteditor').then(({ default: playlistEditor }) => {
const serverId = ApiClient.serverInfo().Id;
new playlistEditor({
items: [],

View File

@ -23,7 +23,7 @@ async function fetchLocal(url, options) {
}
/* eslint-disable-next-line compat/compat */
resolve(new Response(xhr.responseText, {status: status}));
resolve(new Response(xhr.responseText, { status: status }));
};
xhr.onerror = () => {