diff --git a/src/components/cardbuilder/peoplecardbuilder.js b/src/components/cardbuilder/peoplecardbuilder.js index de2dfb64a2..00b8f0fb89 100644 --- a/src/components/cardbuilder/peoplecardbuilder.js +++ b/src/components/cardbuilder/peoplecardbuilder.js @@ -5,7 +5,7 @@ * @module components/cardBuilder/peoplecardbuilder */ -import cardBuilder from '../cardbuilder/cardBuilder'; +import cardBuilder from './cardBuilder'; export function buildPeopleCards(items, options) { options = Object.assign(options || {}, { diff --git a/src/components/guide/guide.js b/src/components/guide/guide.js index 2a169d0941..7ae0b8409f 100644 --- a/src/components/guide/guide.js +++ b/src/components/guide/guide.js @@ -27,7 +27,7 @@ import 'webcomponents.js/webcomponents-lite'; import ServerConnections from '../ServerConnections'; function showViewSettings(instance) { - import('./guide-settings').then((guideSettingsDialog) => { + import('./guide-settings').then(({default: guideSettingsDialog}) => { guideSettingsDialog.show(instance.categoryOptions).then(function () { instance.refresh(); }); diff --git a/src/components/itemContextMenu.js b/src/components/itemContextMenu.js index 1badc2da64..24ee39f899 100644 --- a/src/components/itemContextMenu.js +++ b/src/components/itemContextMenu.js @@ -336,7 +336,7 @@ import toast from './toast/toast'; return new Promise(function (resolve, reject) { switch (id) { case 'addtocollection': - import('./collectionEditor/collectionEditor').then((collectionEditor) => { + import('./collectionEditor/collectionEditor').then(({default: collectionEditor}) => { new collectionEditor({ items: [itemId], serverId: serverId @@ -344,7 +344,7 @@ import toast from './toast/toast'; }); break; case 'addtoplaylist': - import('./playlisteditor/playlisteditor').then((playlistEditor) => { + import('./playlisteditor/playlisteditor').then(({default: playlistEditor}) => { new playlistEditor({ items: [itemId], serverId: serverId @@ -396,7 +396,7 @@ import toast from './toast/toast'; break; } case 'editsubtitles': - import('./subtitleeditor/subtitleeditor').then((subtitleEditor) => { + import('./subtitleeditor/subtitleeditor').then(({default: subtitleEditor}) => { subtitleEditor.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id)); }); break; @@ -452,7 +452,7 @@ import toast from './toast/toast'; playbackManager.clearQueue(); break; case 'record': - import('./recordingcreator/recordingcreator').then((recordingCreator) => { + import('./recordingcreator/recordingcreator').then(({default: recordingCreator}) => { recordingCreator.show(itemId, serverId).then(getResolveFunction(resolve, id, true), getResolveFunction(resolve, id)); }); break; @@ -523,7 +523,7 @@ import toast from './toast/toast'; } function deleteTimer(apiClient, item, resolve, command) { - import('./recordingcreator/recordinghelper').then((recordingHelper) => { + import('./recordingcreator/recordinghelper').then(({default: recordingHelper}) => { const timerId = item.TimerId || item.Id; recordingHelper.cancelTimerWithConfirmation(timerId, item.ServerId).then(function () { getResolveFunction(resolve, command, true)(); @@ -532,7 +532,7 @@ import toast from './toast/toast'; } function deleteSeriesTimer(apiClient, item, resolve, command) { - import('./recordingcreator/recordinghelper').then((recordingHelper) => { + import('./recordingcreator/recordinghelper').then(({default: recordingHelper}) => { recordingHelper.cancelSeriesTimerWithConfirmation(item.Id, item.ServerId).then(function () { getResolveFunction(resolve, command, true)(); }); @@ -566,7 +566,7 @@ import toast from './toast/toast'; const serverId = apiClient.serverInfo().Id; if (item.Type === 'Timer') { - import('./recordingcreator/recordingeditor').then((recordingEditor) => { + import('./recordingcreator/recordingeditor').then(({default: recordingEditor}) => { recordingEditor.show(item.Id, serverId).then(resolve, reject); }); } else if (item.Type === 'SeriesTimer') { @@ -574,7 +574,7 @@ import toast from './toast/toast'; recordingEditor.show(item.Id, serverId).then(resolve, reject); }); } else { - import('./metadataEditor/metadataEditor').then((metadataEditor) => { + import('./metadataEditor/metadataEditor').then(({default: metadataEditor}) => { metadataEditor.show(item.Id, serverId).then(resolve, reject); }); } diff --git a/src/components/mediaLibraryEditor/mediaLibraryEditor.js b/src/components/mediaLibraryEditor/mediaLibraryEditor.js index ee55d2ba88..68fbd73b9b 100644 --- a/src/components/mediaLibraryEditor/mediaLibraryEditor.js +++ b/src/components/mediaLibraryEditor/mediaLibraryEditor.js @@ -161,7 +161,7 @@ import confirm from '../confirm/confirm'; } function showDirectoryBrowser(context, originalPath, networkPath) { - import('../directorybrowser/directorybrowser').then((directoryBrowser) => { + import('../directorybrowser/directorybrowser').then(({default: directoryBrowser}) => { const picker = new directoryBrowser(); picker.show({ enableNetworkSharePath: true, @@ -209,7 +209,7 @@ export class showEditor { currentOptions = options; currentDeferred = deferred; hasChanges = false; - import('./mediaLibraryEditor.template.html').then((template) => { + import('./mediaLibraryEditor.template.html').then(({default: template}) => { const dlg = dialogHelper.createDialog({ size: 'small', modal: false, diff --git a/src/components/metadataEditor/metadataEditor.js b/src/components/metadataEditor/metadataEditor.js index 4fa5645f19..b0233444ee 100644 --- a/src/components/metadataEditor/metadataEditor.js +++ b/src/components/metadataEditor/metadataEditor.js @@ -225,7 +225,7 @@ import toast from '../toast/toast'; } function editPerson(context, person, index) { - import('./personEditor').then((personEditor) => { + import('./personEditor').then(({default: personEditor}) => { personEditor.show(person).then(function (updatedPerson) { const isNew = index === -1; diff --git a/src/components/multiSelect/multiSelect.js b/src/components/multiSelect/multiSelect.js index 466e71c48e..8cfc838d09 100644 --- a/src/components/multiSelect/multiSelect.js +++ b/src/components/multiSelect/multiSelect.js @@ -239,7 +239,7 @@ import confirm from '../confirm/confirm'; switch (id) { case 'addtocollection': - import('../collectionEditor/collectionEditor').then((collectionEditor) => { + import('../collectionEditor/collectionEditor').then(({default: collectionEditor}) => { new collectionEditor({ items: items, serverId: serverId @@ -279,7 +279,7 @@ import confirm from '../confirm/confirm'; dispatchNeedsRefresh(); break; case 'refresh': - import('../refreshdialog/refreshdialog').then((refreshDialog) => { + import('../refreshdialog/refreshdialog').then(({default: refreshDialog}) => { new refreshDialog({ itemIds: items, serverId: serverId diff --git a/src/components/recordingcreator/recordingeditor.js b/src/components/recordingcreator/recordingeditor.js index 13066fc3cd..740321fa45 100644 --- a/src/components/recordingcreator/recordingeditor.js +++ b/src/components/recordingcreator/recordingeditor.js @@ -22,7 +22,7 @@ let currentServerId; let currentResolve; function deleteTimer(apiClient, timerId) { - return import('./recordinghelper').then((recordingHelper) => { + return import('./recordinghelper').then(({ default: recordingHelper }) => { recordingHelper.cancelTimerWithConfirmation(timerId, apiClient.serverId()); }); } diff --git a/src/components/recordingcreator/recordingfields.js b/src/components/recordingcreator/recordingfields.js index 84142fef6b..a29db804ff 100644 --- a/src/components/recordingcreator/recordingfields.js +++ b/src/components/recordingcreator/recordingfields.js @@ -182,7 +182,7 @@ function onManageSeriesRecordingClick(e) { const self = this; - import('./seriesrecordingeditor').then((seriesRecordingEditor) => { + import('./seriesrecordingeditor').then(({default: seriesRecordingEditor}) => { seriesRecordingEditor.show(self.SeriesTimerId, options.serverId, { enableCancel: false diff --git a/src/components/recordingcreator/seriesrecordingeditor.js b/src/components/recordingcreator/seriesrecordingeditor.js index c21b8c6cb7..c0dbd74a62 100644 --- a/src/components/recordingcreator/seriesrecordingeditor.js +++ b/src/components/recordingcreator/seriesrecordingeditor.js @@ -26,7 +26,7 @@ let currentServerId; function deleteTimer(apiClient, timerId) { return new Promise(function (resolve, reject) { - import('./recordinghelper').then((recordingHelper) => { + import('./recordinghelper').then(({ default: recordingHelper }) => { recordingHelper.cancelSeriesTimerWithConfirmation(timerId, apiClient.serverId()).then(resolve, reject); }); }); diff --git a/src/components/shortcuts.js b/src/components/shortcuts.js index 5c2e205398..fe7bfefc90 100644 --- a/src/components/shortcuts.js +++ b/src/components/shortcuts.js @@ -269,7 +269,7 @@ import toast from './toast/toast'; } function addToPlaylist(item) { - import('./playlisteditor/playlisteditor').then((playlistEditor) => { + import('./playlisteditor/playlisteditor').then(({default: playlistEditor}) => { new playlistEditor().show({ items: [item.Id], serverId: item.ServerId @@ -294,16 +294,16 @@ import toast from './toast/toast'; if (item.Type === 'Timer') { if (item.ProgramId) { - import('./recordingcreator/recordingcreator').then((recordingCreator) => { + import('./recordingcreator/recordingcreator').then(({default: recordingCreator}) => { recordingCreator.show(item.ProgramId, serverId).then(resolve, reject); }); } else { - import('./recordingcreator/recordingeditor').then((recordingEditor) => { + import('./recordingcreator/recordingeditor').then(({default: recordingEditor}) => { recordingEditor.show(item.Id, serverId).then(resolve, reject); }); } } else { - import('./metadataEditor/metadataEditor').then((metadataEditor) => { + import('./metadataEditor/metadataEditor').then(({default: metadataEditor}) => { metadataEditor.show(item.Id, serverId).then(resolve, reject); }); } @@ -397,4 +397,3 @@ export default { onClick: onClick, getShortcutAttributesHtml: getShortcutAttributesHtml }; - diff --git a/src/controllers/dashboard/library.js b/src/controllers/dashboard/library.js index 9500ea0d68..b2d6f61e6d 100644 --- a/src/controllers/dashboard/library.js +++ b/src/controllers/dashboard/library.js @@ -13,7 +13,7 @@ import confirm from '../../components/confirm/confirm'; /* eslint-disable indent */ function addVirtualFolder(page) { - import('../../components/mediaLibraryCreator/mediaLibraryCreator').then((medialibrarycreator) => { + import('../../components/mediaLibraryCreator/mediaLibraryCreator').then(({default: medialibrarycreator}) => { new medialibrarycreator({ collectionTypeOptions: getCollectionTypeOptions().filter(function (f) { return !f.hidden; @@ -28,7 +28,7 @@ import confirm from '../../components/confirm/confirm'; } function editVirtualFolder(page, virtualFolder) { - import('../../components/mediaLibraryEditor/mediaLibraryEditor').then((medialibraryeditor) => { + import('../../components/mediaLibraryEditor/mediaLibraryEditor').then(({default: medialibraryeditor}) => { new medialibraryeditor({ refresh: shouldRefreshLibraryAfterChanges(page), library: virtualFolder @@ -62,7 +62,7 @@ import confirm from '../../components/confirm/confirm'; } function refreshVirtualFolder(page, virtualFolder) { - import('../../components/refreshdialog/refreshdialog').then((refreshDialog) => { + import('../../components/refreshdialog/refreshdialog').then(({default: refreshDialog}) => { new refreshDialog({ itemIds: [virtualFolder.ItemId], serverId: ApiClient.serverId(),