From 6f3aa2f1df125f511e0e04a8fc44c1bde986bd7c Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 29 Mar 2023 00:38:22 -0400 Subject: [PATCH] Fix eslint issues --- postcss.config.js | 4 +- .../accessSchedule/accessSchedule.js | 2 +- src/components/apphost.js | 20 ++++---- src/components/cardbuilder/cardBuilder.js | 4 +- .../cardbuilder/chaptercardbuilder.js | 6 +-- src/components/common/Filter.tsx | 2 +- src/components/common/NewCollection.tsx | 2 +- src/components/common/SelectView.tsx | 2 +- src/components/common/Sort.tsx | 2 +- .../dashboard/users/AccessContainer.tsx | 2 +- .../dashboard/users/AccessScheduleList.tsx | 2 +- .../dashboard/users/BlockedTagList.tsx | 2 +- .../dashboard/users/SectionTabs.tsx | 2 +- .../dashboard/users/UserCardBox.tsx | 2 +- .../dashboard/users/UserPasswordForm.tsx | 8 +-- src/components/guide/guide.js | 2 +- src/components/htmlMediaHelper.js | 8 +-- src/components/imageeditor/imageeditor.js | 4 +- src/components/itemContextMenu.js | 20 ++++---- .../itemidentifier/itemidentifier.js | 2 +- .../libraryoptionseditor.js | 2 +- src/components/maintabsmanager.js | 2 +- .../mediaLibraryCreator.js | 2 +- .../mediaLibraryEditor/mediaLibraryEditor.js | 2 +- src/components/mediainfo/mediainfo.js | 8 +-- .../metadataEditor/metadataEditor.js | 18 +++---- src/components/multiSelect/multiSelect.js | 4 +- src/components/playback/mediasession.js | 2 +- .../recordingcreator/recordingfields.js | 4 +- src/components/scrollManager.js | 8 +-- src/components/search/SearchFields.tsx | 4 +- src/components/shortcuts.js | 10 ++-- .../subtitleeditor/subtitleeditor.js | 4 +- src/components/subtitlesync/subtitlesync.js | 6 +-- src/components/tvproviders/xmltv.js | 2 +- src/components/viewManager/viewManager.js | 2 +- src/controllers/dashboard/apikeys.js | 2 +- src/controllers/dashboard/dashboard.js | 4 +- src/controllers/dashboard/devices/devices.js | 2 +- src/controllers/dashboard/encodingsettings.js | 6 +-- src/controllers/dashboard/general.js | 4 +- src/controllers/dashboard/library.js | 8 +-- src/controllers/dashboard/networking.js | 2 +- src/controllers/list.js | 10 ++-- src/controllers/livetv/livetvchannels.js | 4 +- src/controllers/livetv/livetvsuggested.js | 4 +- src/controllers/livetvguideprovider.js | 4 +- src/controllers/livetvsettings.js | 8 +-- src/controllers/livetvstatus.js | 8 +-- src/controllers/livetvtuner.js | 4 +- src/controllers/music/musicalbums.js | 4 +- src/controllers/music/musicartists.js | 4 +- src/controllers/music/musicgenres.js | 2 +- src/controllers/music/musicplaylists.js | 2 +- src/controllers/music/musicrecommended.js | 6 +-- src/controllers/music/songs.js | 4 +- src/controllers/playback/video/index.js | 16 +++--- src/controllers/session/addServer/index.js | 4 +- src/controllers/session/login/index.js | 2 +- src/controllers/shows/episodes.js | 4 +- src/controllers/shows/tvrecommended.js | 2 +- src/controllers/shows/tvshows.js | 4 +- src/controllers/shows/tvstudios.js | 2 +- src/controllers/user/controls/index.js | 2 +- src/controllers/user/menu/index.js | 2 +- src/elements/SectionTitleContainer.tsx | 2 +- .../emby-itemscontainer.js | 2 +- src/elements/emby-scroller/Scroller.tsx | 4 +- src/plugins/backdropScreensaver/plugin.js | 2 +- src/plugins/bookPlayer/tableOfContents.js | 4 +- src/plugins/htmlVideoPlayer/plugin.js | 6 +-- src/plugins/photoPlayer/plugin.js | 2 +- src/plugins/syncPlay/core/PlaybackCore.js | 28 +++++------ src/plugins/syncPlay/core/QueueCore.js | 6 +-- src/routes/movies/SuggestionsView.tsx | 4 +- src/routes/search.tsx | 4 +- src/routes/user/useredit.tsx | 14 +++--- src/routes/user/userparentalcontrol.tsx | 10 ++-- src/routes/user/userprofile.tsx | 12 ++--- src/routes/user/userprofiles.tsx | 4 +- src/scripts/browser.js | 32 ++++++------ src/scripts/browserDeviceProfile.js | 50 +++++++++---------- src/scripts/libraryBrowser.js | 4 +- src/scripts/playlists.js | 2 +- src/scripts/settings/webSettings.js | 2 +- 85 files changed, 251 insertions(+), 251 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index bd1651fa19..aee1640a54 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -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() ] }); diff --git a/src/components/accessSchedule/accessSchedule.js b/src/components/accessSchedule/accessSchedule.js index 33df97532e..bbfb35ebca 100644 --- a/src/components/accessSchedule/accessSchedule.js +++ b/src/components/accessSchedule/accessSchedule.js @@ -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; diff --git a/src/components/apphost.js b/src/components/apphost.js index 4a12a78d0e..2cb709e112 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -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 {}; diff --git a/src/components/cardbuilder/cardBuilder.js b/src/components/cardbuilder/cardBuilder.js index dfbc0a6768..04c03c6605 100644 --- a/src/components/cardbuilder/cardBuilder.js +++ b/src/components/cardbuilder/cardBuilder.js @@ -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 || ''); diff --git a/src/components/cardbuilder/chaptercardbuilder.js b/src/components/cardbuilder/chaptercardbuilder.js index f479fb4c88..794e845f8f 100644 --- a/src/components/cardbuilder/chaptercardbuilder.js +++ b/src/components/cardbuilder/chaptercardbuilder.js @@ -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'; diff --git a/src/components/common/Filter.tsx b/src/components/common/Filter.tsx index 4db46e332b..c3316df1a2 100644 --- a/src/components/common/Filter.tsx +++ b/src/components/common/Filter.tsx @@ -22,7 +22,7 @@ const Filter: FC = ({ const element = useRef(null); const showFilterMenu = useCallback(() => { - import('../filtermenu/filtermenu').then(({default: FilterMenu}) => { + import('../filtermenu/filtermenu').then(({ default: FilterMenu }) => { const filterMenu = new FilterMenu(); filterMenu.show({ settings: viewQuerySettings, diff --git a/src/components/common/NewCollection.tsx b/src/components/common/NewCollection.tsx index 4cf6e07365..4eadda8e36 100644 --- a/src/components/common/NewCollection.tsx +++ b/src/components/common/NewCollection.tsx @@ -6,7 +6,7 @@ const NewCollection: FC = () => { const element = useRef(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({ diff --git a/src/components/common/SelectView.tsx b/src/components/common/SelectView.tsx index 7a65e48872..f718529857 100644 --- a/src/components/common/SelectView.tsx +++ b/src/components/common/SelectView.tsx @@ -16,7 +16,7 @@ const SelectView: FC = ({ const element = useRef(null); const showViewSettingsMenu = useCallback(() => { - import('../viewSettings/viewSettings').then(({default: ViewSettings}) => { + import('../viewSettings/viewSettings').then(({ default: ViewSettings }) => { const viewsettings = new ViewSettings(); viewsettings.show({ settings: viewQuerySettings, diff --git a/src/components/common/Sort.tsx b/src/components/common/Sort.tsx index c99b332858..5c5d1b6193 100644 --- a/src/components/common/Sort.tsx +++ b/src/components/common/Sort.tsx @@ -19,7 +19,7 @@ const Sort: FC = ({ const element = useRef(null); const showSortMenu = useCallback(() => { - import('../sortmenu/sortmenu').then(({default: SortMenu}) => { + import('../sortmenu/sortmenu').then(({ default: SortMenu }) => { const sortMenu = new SortMenu(); sortMenu.show({ settings: viewQuerySettings, diff --git a/src/components/dashboard/users/AccessContainer.tsx b/src/components/dashboard/users/AccessContainer.tsx index 656292ece7..32fe9c213d 100644 --- a/src/components/dashboard/users/AccessContainer.tsx +++ b/src/components/dashboard/users/AccessContainer.tsx @@ -14,7 +14,7 @@ type IProps = { children?: React.ReactNode } -const AccessContainer: FunctionComponent = ({containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => { +const AccessContainer: FunctionComponent = ({ containerClassName, headerTitle, checkBoxClassName, checkBoxTitle, listContainerClassName, accessClassName, listTitle, description, children }: IProps) => { return (

{globalize.translate(headerTitle)}

diff --git a/src/components/dashboard/users/AccessScheduleList.tsx b/src/components/dashboard/users/AccessScheduleList.tsx index a96e390de1..41c55c3621 100644 --- a/src/components/dashboard/users/AccessScheduleList.tsx +++ b/src/components/dashboard/users/AccessScheduleList.tsx @@ -22,7 +22,7 @@ function getDisplayTime(hours = 0) { return datetime.getDisplayTime(new Date(2000, 1, 1, hours, minutes, 0, 0)); } -const AccessScheduleList: FunctionComponent = ({index, DayOfWeek, StartHour, EndHour}: AccessScheduleListProps) => { +const AccessScheduleList: FunctionComponent = ({ index, DayOfWeek, StartHour, EndHour }: AccessScheduleListProps) => { return (
= ({tag}: IProps) => { +const BlockedTagList: FunctionComponent = ({ tag }: IProps) => { return (
diff --git a/src/components/dashboard/users/SectionTabs.tsx b/src/components/dashboard/users/SectionTabs.tsx index 285997a44d..41287dd009 100644 --- a/src/components/dashboard/users/SectionTabs.tsx +++ b/src/components/dashboard/users/SectionTabs.tsx @@ -36,7 +36,7 @@ const createLinkElement = (activeTab: string) => ({ ` }); -const SectionTabs: FunctionComponent = ({activeTab}: IProps) => { +const SectionTabs: FunctionComponent = ({ activeTab }: IProps) => { return (
= ({ user = {} }: IProps) => {
= ({userId}: IProps) => { +const UserPasswordForm: FunctionComponent = ({ userId }: IProps) => { const element = useRef(null); const loadUser = useCallback(() => { @@ -76,7 +76,7 @@ const UserPasswordForm: FunctionComponent = ({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 = ({userId}: IProps) => {
@@ -260,7 +260,7 @@ const UserPasswordForm: FunctionComponent = ({userId}: IProps) => {
diff --git a/src/components/guide/guide.js b/src/components/guide/guide.js index 36137af21d..907de76b88 100644 --- a/src/components/guide/guide.js +++ b/src/components/guide/guide.js @@ -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(); }); diff --git a/src/components/htmlMediaHelper.js b/src/components/htmlMediaHelper.js index 7f9d3f36d5..22816aee35 100644 --- a/src/components/htmlMediaHelper.js +++ b/src/components/htmlMediaHelper.js @@ -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(); } diff --git a/src/components/imageeditor/imageeditor.js b/src/components/imageeditor/imageeditor.js index 1711169dbc..b2c9033bc3 100644 --- a/src/components/imageeditor/imageeditor.js +++ b/src/components/imageeditor/imageeditor.js @@ -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, diff --git a/src/components/itemContextMenu.js b/src/components/itemContextMenu.js index e0bcb1562b..e132c706e3 100644 --- a/src/components/itemContextMenu.js +++ b/src/components/itemContextMenu.js @@ -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, diff --git a/src/components/itemidentifier/itemidentifier.js b/src/components/itemidentifier/itemidentifier.js index ae76477989..9ada1d60c2 100644 --- a/src/components/itemidentifier/itemidentifier.js +++ b/src/components/itemidentifier/itemidentifier.js @@ -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('
'); diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index da9557d62e..dabaf1c8a9 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -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 = { diff --git a/src/components/maintabsmanager.js b/src/components/maintabsmanager.js index 5ce5b55c9a..76d0090ba8 100644 --- a/src/components/maintabsmanager.js +++ b/src/components/maintabsmanager.js @@ -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); diff --git a/src/components/mediaLibraryCreator/mediaLibraryCreator.js b/src/components/mediaLibraryCreator/mediaLibraryCreator.js index aa153c82d4..1592b27c2e 100644 --- a/src/components/mediaLibraryCreator/mediaLibraryCreator.js +++ b/src/components/mediaLibraryCreator/mediaLibraryCreator.js @@ -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, diff --git a/src/components/mediaLibraryEditor/mediaLibraryEditor.js b/src/components/mediaLibraryEditor/mediaLibraryEditor.js index c90acc0078..c9f931297d 100644 --- a/src/components/mediaLibraryEditor/mediaLibraryEditor.js +++ b/src/components/mediaLibraryEditor/mediaLibraryEditor.js @@ -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, diff --git a/src/components/mediainfo/mediainfo.js b/src/components/mediainfo/mediainfo.js index 6b64059041..530e102f14 100644 --- a/src/components/mediainfo/mediainfo.js +++ b/src/components/mediainfo/mediainfo.js @@ -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); diff --git a/src/components/metadataEditor/metadataEditor.js b/src/components/metadataEditor/metadataEditor.js index fb69d20aa2..a9596c3786 100644 --- a/src/components/metadataEditor/metadataEditor.js +++ b/src/components/metadataEditor/metadataEditor.js @@ -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); diff --git a/src/components/multiSelect/multiSelect.js b/src/components/multiSelect/multiSelect.js index 6632ef628b..3984968174 100644 --- a/src/components/multiSelect/multiSelect.js +++ b/src/components/multiSelect/multiSelect.js @@ -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 diff --git a/src/components/playback/mediasession.js b/src/components/playback/mediasession.js index d16fe7756f..6c560c222d 100644 --- a/src/components/playback/mediasession.js +++ b/src/components/playback/mediasession.js @@ -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); } diff --git a/src/components/recordingcreator/recordingfields.js b/src/components/recordingcreator/recordingfields.js index 742a77df4b..d890148c3b 100644 --- a/src/components/recordingcreator/recordingfields.js +++ b/src/components/recordingcreator/recordingfields.js @@ -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 diff --git a/src/components/scrollManager.js b/src/components/scrollManager.js index 72f5a69fb2..6a5aee3645 100644 --- a/src/components/scrollManager.js +++ b/src/components/scrollManager.js @@ -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 */ diff --git a/src/components/search/SearchFields.tsx b/src/components/search/SearchFields.tsx index 8a0fa01dfd..cdc8c69a3c 100644 --- a/src/components/search/SearchFields.tsx +++ b/src/components/search/SearchFields.tsx @@ -85,8 +85,8 @@ const SearchFields: FunctionComponent = ({ onSearch = () => { dangerouslySetInnerHTML={createInputElement()} />
- {layoutManager.tv && !browser.tv && - + {layoutManager.tv && !browser.tv + && }
); diff --git a/src/components/shortcuts.js b/src/components/shortcuts.js index 60e51c784c..62f43a3436 100644 --- a/src/components/shortcuts.js +++ b/src/components/shortcuts.js @@ -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); }); } diff --git a/src/components/subtitleeditor/subtitleeditor.js b/src/components/subtitleeditor/subtitleeditor.js index b332e4238f..572cccc1fa 100644 --- a/src/components/subtitleeditor/subtitleeditor.js +++ b/src/components/subtitleeditor/subtitleeditor.js @@ -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, diff --git a/src/components/subtitlesync/subtitlesync.js b/src/components/subtitlesync/subtitlesync.js index 80da4d7b12..dcdfe45874 100644 --- a/src/components/subtitlesync/subtitlesync.js +++ b/src/components/subtitlesync/subtitlesync.js @@ -94,9 +94,9 @@ function init(instance) { subtitleSyncSlider.getBubbleHtml = function (value) { const newOffset = getOffsetFromPercentage(value); - return '

' + - (newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's' + - '

'; + return '

' + + (newOffset > 0 ? '+' : '') + parseFloat(newOffset) + 's' + + '

'; }; subtitleSyncCloseButton.addEventListener('click', function () { diff --git a/src/components/tvproviders/xmltv.js b/src/components/tvproviders/xmltv.js index dc5f896447..7b5123c908 100644 --- a/src/components/tvproviders/xmltv.js +++ b/src/components/tvproviders/xmltv.js @@ -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, diff --git a/src/components/viewManager/viewManager.js b/src/components/viewManager/viewManager.js index c9a64b658a..12a5f1a9d6 100644 --- a/src/components/viewManager/viewManager.js +++ b/src/components/viewManager/viewManager.js @@ -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)); diff --git a/src/controllers/dashboard/apikeys.js b/src/controllers/dashboard/apikeys.js index 9eec8503c5..0946f10e60 100644 --- a/src/controllers/dashboard/apikeys.js +++ b/src/controllers/dashboard/apikeys.js @@ -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'), diff --git a/src/controllers/dashboard/dashboard.js b/src/controllers/dashboard/dashboard.js index fd98d163e9..d2db85156a 100644 --- a/src/controllers/dashboard/dashboard.js +++ b/src/controllers/dashboard/dashboard.js @@ -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()) { diff --git a/src/controllers/dashboard/devices/devices.js b/src/controllers/dashboard/devices/devices.js index 537e842d90..348d6d2be1 100644 --- a/src/controllers/dashboard/devices/devices.js +++ b/src/controllers/dashboard/devices/devices.js @@ -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, diff --git a/src/controllers/dashboard/encodingsettings.js b/src/controllers/dashboard/encodingsettings.js index 563dc07447..f122d6da2a 100644 --- a/src/controllers/dashboard/encodingsettings.js +++ b/src/controllers/dashboard/encodingsettings.js @@ -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, diff --git a/src/controllers/dashboard/general.js b/src/controllers/dashboard/general.js index 9b417534f4..ed7268748f 100644 --- a/src/controllers/dashboard/general.js +++ b/src/controllers/dashboard/general.js @@ -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(), diff --git a/src/controllers/dashboard/library.js b/src/controllers/dashboard/library.js index 49ff203902..62cb3edf42 100644 --- a/src/controllers/dashboard/library.js +++ b/src/controllers/dashboard/library.js @@ -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'), diff --git a/src/controllers/dashboard/networking.js b/src/controllers/dashboard/networking.js index 2989eb9bd5..a98715705c 100644 --- a/src/controllers/dashboard/networking.js +++ b/src/controllers/dashboard/networking.js @@ -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, diff --git a/src/controllers/list.js b/src/controllers/list.js index 334b658ebc..cf57fa2ee0 100644 --- a/src/controllers/list.js +++ b/src/controllers/list.js @@ -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); }); } diff --git a/src/controllers/livetv/livetvchannels.js b/src/controllers/livetv/livetvchannels.js index 90469c59f6..3dc1d04c97 100644 --- a/src/controllers/livetv/livetvchannels.js +++ b/src/controllers/livetv/livetvchannels.js @@ -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); }); }); diff --git a/src/controllers/livetv/livetvsuggested.js b/src/controllers/livetv/livetvsuggested.js index 8b97984d0a..8446838df5 100644 --- a/src/controllers/livetv/livetvsuggested.js +++ b/src/controllers/livetv/livetvsuggested.js @@ -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) { diff --git a/src/controllers/livetvguideprovider.js b/src/controllers/livetvguideprovider.js index accdbe56bc..fbc77cc7b6 100644 --- a/src/controllers/livetvguideprovider.js +++ b/src/controllers/livetvguideprovider.js @@ -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); }); diff --git a/src/controllers/livetvsettings.js b/src/controllers/livetvsettings.js index 7559b827c2..053b032282 100644 --- a/src/controllers/livetvsettings.js +++ b/src/controllers/livetvsettings.js @@ -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, diff --git a/src/controllers/livetvstatus.js b/src/controllers/livetvstatus.js index 8b2b4bebc3..5eb13c9793 100644 --- a/src/controllers/livetvstatus.js +++ b/src/controllers/livetvstatus.js @@ -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 diff --git a/src/controllers/livetvtuner.js b/src/controllers/livetvtuner.js index 6b798c6c4a..b15eea9d8a 100644 --- a/src/controllers/livetvtuner.js +++ b/src/controllers/livetvtuner.js @@ -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, diff --git a/src/controllers/music/musicalbums.js b/src/controllers/music/musicalbums.js index 7b2cf65b42..d1ad28b992 100644 --- a/src/controllers/music/musicalbums.js +++ b/src/controllers/music/musicalbums.js @@ -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', diff --git a/src/controllers/music/musicartists.js b/src/controllers/music/musicartists.js index b05ddd31fa..040df1af73 100644 --- a/src/controllers/music/musicartists.js +++ b/src/controllers/music/musicartists.js @@ -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, diff --git a/src/controllers/music/musicgenres.js b/src/controllers/music/musicgenres.js index c0e48e9a52..de64af44de 100644 --- a/src/controllers/music/musicgenres.js +++ b/src/controllers/music/musicgenres.js @@ -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); }); }); diff --git a/src/controllers/music/musicplaylists.js b/src/controllers/music/musicplaylists.js index 2d98aa5a99..8f562f1aaa 100644 --- a/src/controllers/music/musicplaylists.js +++ b/src/controllers/music/musicplaylists.js @@ -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); }); }); diff --git a/src/controllers/music/musicrecommended.js b/src/controllers/music/musicrecommended.js index bbb154a4e1..e2e15d2ab2 100644 --- a/src/controllers/music/musicrecommended.js +++ b/src/controllers/music/musicrecommended.js @@ -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) { diff --git a/src/controllers/music/songs.js b/src/controllers/music/songs.js index ed76a04ab3..06af0b3081 100644 --- a/src/controllers/music/songs.js +++ b/src/controllers/music/songs.js @@ -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', diff --git a/src/controllers/playback/video/index.js b/src/controllers/playback/video/index.js index d7bbab581d..54f3308e5e 100644 --- a/src/controllers/playback/video/index.js +++ b/src/controllers/playback/video/index.js @@ -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, diff --git a/src/controllers/session/addServer/index.js b/src/controllers/session/addServer/index.js index 17c72f8e19..64deaa2fcf 100644 --- a/src/controllers/session/addServer/index.js +++ b/src/controllers/session/addServer/index.js @@ -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(); }); } diff --git a/src/controllers/session/login/index.js b/src/controllers/session/login/index.js index 258e670713..f0c3639b83 100644 --- a/src/controllers/session/login/index.js +++ b/src/controllers/session/login/index.js @@ -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); }); } diff --git a/src/controllers/shows/episodes.js b/src/controllers/shows/episodes.js index ba7096c0d4..2cbe4117f6 100644 --- a/src/controllers/shows/episodes.js +++ b/src/controllers/shows/episodes.js @@ -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', diff --git a/src/controllers/shows/tvrecommended.js b/src/controllers/shows/tvrecommended.js index d1e53b38de..0066cf48a2 100644 --- a/src/controllers/shows/tvrecommended.js +++ b/src/controllers/shows/tvrecommended.js @@ -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) { diff --git a/src/controllers/shows/tvshows.js b/src/controllers/shows/tvshows.js index 8c58bf6ff1..296746613e 100644 --- a/src/controllers/shows/tvshows.js +++ b/src/controllers/shows/tvshows.js @@ -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', diff --git a/src/controllers/shows/tvstudios.js b/src/controllers/shows/tvstudios.js index 5a0276e5f4..faa8bb90af 100644 --- a/src/controllers/shows/tvstudios.js +++ b/src/controllers/shows/tvstudios.js @@ -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); }); }); diff --git a/src/controllers/user/controls/index.js b/src/controllers/user/controls/index.js index 066f5b1a42..cb212e5297 100644 --- a/src/controllers/user/controls/index.js +++ b/src/controllers/user/controls/index.js @@ -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); }); }); diff --git a/src/controllers/user/menu/index.js b/src/controllers/user/menu/index.js index 073af9c0db..7f8ae7ecb4 100644 --- a/src/controllers/user/menu/index.js +++ b/src/controllers/user/menu/index.js @@ -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); }); }); diff --git a/src/elements/SectionTitleContainer.tsx b/src/elements/SectionTitleContainer.tsx index 6919169a5f..aa85e3c312 100644 --- a/src/elements/SectionTitleContainer.tsx +++ b/src/elements/SectionTitleContainer.tsx @@ -13,7 +13,7 @@ type IProps = { isLinkVisible?: boolean; url?: string; } -const SectionTitleContainer: FunctionComponent = ({SectionClassName, title, isBtnVisible = false, btnId, btnClassName, btnTitle, btnIcon, isLinkVisible = true, url}: IProps) => { +const SectionTitleContainer: FunctionComponent = ({ SectionClassName, title, isBtnVisible = false, btnId, btnClassName, btnTitle, btnIcon, isLinkVisible = true, url }: IProps) => { return (

diff --git a/src/elements/emby-itemscontainer/emby-itemscontainer.js b/src/elements/emby-itemscontainer/emby-itemscontainer.js index ae0f0fef54..4c7769f32e 100644 --- a/src/elements/emby-itemscontainer/emby-itemscontainer.js +++ b/src/elements/emby-itemscontainer/emby-itemscontainer.js @@ -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 diff --git a/src/elements/emby-scroller/Scroller.tsx b/src/elements/emby-scroller/Scroller.tsx index 14313318a6..36b38cc1fb 100644 --- a/src/elements/emby-scroller/Scroller.tsx +++ b/src/elements/emby-scroller/Scroller.tsx @@ -229,8 +229,8 @@ const Scroller: FC = ({ return ( <> { - showControls && scrollState.scrollWidth > scrollState.scrollSize + 20 && - scrollState.scrollSize + 20 + && { 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, diff --git a/src/plugins/bookPlayer/tableOfContents.js b/src/plugins/bookPlayer/tableOfContents.js index efbb533b22..2da57b9229 100644 --- a/src/plugins/bookPlayer/tableOfContents.js +++ b/src/plugins/bookPlayer/tableOfContents.js @@ -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() { diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index e624fcd941..cabf6cb3dc 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -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 diff --git a/src/plugins/photoPlayer/plugin.js b/src/plugins/photoPlayer/plugin.js index 7c41c53188..44aa79b82f 100644 --- a/src/plugins/photoPlayer/plugin.js +++ b/src/plugins/photoPlayer/plugin.js @@ -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(); diff --git a/src/plugins/syncPlay/core/PlaybackCore.js b/src/plugins/syncPlay/core/PlaybackCore.js index ceb5653c76..effa1cab62 100644 --- a/src/plugins/syncPlay/core/PlaybackCore.js +++ b/src/plugins/syncPlay/core/PlaybackCore.js @@ -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; diff --git a/src/plugins/syncPlay/core/QueueCore.js b/src/plugins/syncPlay/core/QueueCore.js index f1a435106e..721ed7403a 100644 --- a/src/plugins/syncPlay/core/QueueCore.js +++ b/src/plugins/syncPlay/core/QueueCore.js @@ -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(); diff --git a/src/routes/movies/SuggestionsView.tsx b/src/routes/movies/SuggestionsView.tsx index 362fb7ee91..0d4b944be9 100644 --- a/src/routes/movies/SuggestionsView.tsx +++ b/src/routes/movies/SuggestionsView.tsx @@ -9,7 +9,7 @@ import RecommendationContainer from '../../components/common/RecommendationConta import SectionContainer from '../../components/common/SectionContainer'; import { LibraryViewProps } from '../../types/interface'; -const SuggestionsView: FC = ({topParentId}) => { +const SuggestionsView: FC = ({ topParentId }) => { const [ latestItems, setLatestItems ] = useState([]); const [ resumeResult, setResumeResult ] = useState({}); const [ recommendations, setRecommendations ] = useState([]); @@ -28,7 +28,7 @@ const SuggestionsView: FC = ({topParentId}) => { }, [enableScrollX]); const autoFocus = useCallback((page) => { - import('../../components/autoFocuser').then(({default: autoFocuser}) => { + import('../../components/autoFocuser').then(({ default: autoFocuser }) => { autoFocuser.autoFocus(page); }); }, []); diff --git a/src/routes/search.tsx b/src/routes/search.tsx index d154018b4e..192f90bb67 100644 --- a/src/routes/search.tsx +++ b/src/routes/search.tsx @@ -19,8 +19,8 @@ const Search: FunctionComponent = () => { className='mainAnimatedPage libraryPage allLibraryPage noSecondaryNavPage' > - {!query && - } diff --git a/src/routes/user/useredit.tsx b/src/routes/user/useredit.tsx index b2eef63c76..67fe055632 100644 --- a/src/routes/user/useredit.tsx +++ b/src/routes/user/useredit.tsx @@ -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 = () => {
{
{globalize.translate('HeaderThisUserIsCurrentlyDisabled')}
-
+
{globalize.translate('MessageReenableUser')}
@@ -386,7 +386,7 @@ const UserEdit: FunctionComponent = () => {

{globalize.translate('HeaderFeatureAccess')}

-
+
{

{globalize.translate('HeaderPlayback')}

-
+
{
-

+

{globalize.translate('HeaderAllowMediaDeletionFrom')}

@@ -484,7 +484,7 @@ const UserEdit: FunctionComponent = () => {

{globalize.translate('HeaderRemoteControl')}

-
+
{ 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 = () => {

-
+
{ btnIcon='add' isLinkVisible={false} /> -
+
{blockedTags.map(tag => { return { })}
-
+
{
-
-

+
+

{userName}


diff --git a/src/routes/user/userprofiles.tsx b/src/routes/user/userprofiles.tsx index ff39fae33f..055afb0f8b 100644 --- a/src/routes/user/userprofiles.tsx +++ b/src/routes/user/userprofiles.tsx @@ -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, diff --git a/src/scripts/browser.js b/src/scripts/browser.js index a6042189dc..7540d0c684 100644 --- a/src/scripts/browser.js +++ b/src/scripts/browser.js @@ -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] || ''; diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index a98f72e612..e5943d69bb 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -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'; } diff --git a/src/scripts/libraryBrowser.js b/src/scripts/libraryBrowser.js index 0a44aaad36..ce4f6410a1 100644 --- a/src/scripts/libraryBrowser.js +++ b/src/scripts/libraryBrowser.js @@ -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; diff --git a/src/scripts/playlists.js b/src/scripts/playlists.js index 8965676e46..eb3fac9ece 100644 --- a/src/scripts/playlists.js +++ b/src/scripts/playlists.js @@ -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: [], diff --git a/src/scripts/settings/webSettings.js b/src/scripts/settings/webSettings.js index 517b7fe0e2..afec7eafac 100644 --- a/src/scripts/settings/webSettings.js +++ b/src/scripts/settings/webSettings.js @@ -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 = () => {