diff --git a/src/components/directorybrowser/directorybrowser.js b/src/components/directorybrowser/directorybrowser.js index 5dbebf172d..f249fc813b 100644 --- a/src/components/directorybrowser/directorybrowser.js +++ b/src/components/directorybrowser/directorybrowser.js @@ -11,15 +11,6 @@ import '../formdialog.scss'; import '../../elements/emby-button/emby-button'; import alert from '../alert'; -function getSystemInfo() { - return systemInfo ? Promise.resolve(systemInfo) : ApiClient.getPublicSystemInfo().then( - info => { - systemInfo = info; - return info; - } - ); -} - function onDialogClosed() { loading.hide(); } @@ -83,25 +74,14 @@ function getItem(cssClass, type, path, name) { return html; } -function getEditorHtml(options, systemInfo) { +function getEditorHtml(options) { let html = ''; html += '
'; html += '
'; - if (!options.pathReadOnly && (options.instruction || systemInfo.OperatingSystem)) { + if (!options.pathReadOnly && options.instruction) { const instruction = options.instruction ? `${escapeHtml(options.instruction)}

` : ''; html += '
'; html += instruction; - if (systemInfo.OperatingSystem.toLowerCase() === 'bsd') { - html += '
'; - html += '
'; - html += globalize.translate('MessageDirectoryPickerBSDInstruction'); - html += '
'; - } else if (systemInfo.OperatingSystem.toLowerCase() === 'linux') { - html += '
'; - html += '
'; - html += globalize.translate('MessageDirectoryPickerLinuxInstruction'); - html += '
'; - } html += '
'; } html += '
'; @@ -234,7 +214,6 @@ function getDefaultPath(options) { } } -let systemInfo; class DirectoryBrowser { currentDialog; @@ -249,10 +228,8 @@ class DirectoryBrowser { if (options.includeFiles != null) { fileOptions.includeFiles = options.includeFiles; } - Promise.all([getSystemInfo(), getDefaultPath(options)]).then( - responses => { - const fetchedSystemInfo = responses[0]; - const fetchedInitialPath = responses[1]; + getDefaultPath(options).then( + fetchedInitialPath => { const dlg = dialogHelper.createDialog({ size: 'small', removeOnClose: true, @@ -270,7 +247,7 @@ class DirectoryBrowser { html += escapeHtml(options.header || '') || globalize.translate('HeaderSelectPath'); html += ''; html += '
'; - html += getEditorHtml(options, fetchedSystemInfo); + html += getEditorHtml(options); dlg.innerHTML = html; initEditor(dlg, options, fileOptions); dlg.addEventListener('close', onDialogClosed); diff --git a/src/strings/en-us.json b/src/strings/en-us.json index d2e32a1ff4..2800668b26 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1082,8 +1082,6 @@ "MessageContactAdminToResetPassword": "Please contact your system administrator to reset your password.", "MessageCreateAccountAt": "Create an account at {0}", "MessageDeleteTaskTrigger": "Are you sure you wish to delete this task trigger?", - "MessageDirectoryPickerBSDInstruction": "For BSD, you may need to set up storage within your 'FreeNAS Jail' so Jellyfin can access your media.", - "MessageDirectoryPickerLinuxInstruction": "For Linux on Arch Linux, CentOS, Debian, Fedora, openSUSE, or Ubuntu, you must grant the service user at least read access to your storage locations.", "MessageDownloadQueued": "Download queued.", "MessageEnablingOptionLongerScans": "Enabling this option may result in significantly longer library scans.", "MessageFileReadError": "There was an error reading the file. Please try again.",