From d9ce6d43e482330a951dc3691852bb991a77a5ec Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 14 Aug 2023 00:03:18 +0300 Subject: [PATCH] Show warning when using the docker update mechanism (cherry picked from commit cc538c4b2d33a1734c45c0667776d946596107e9) --- frontend/src/Settings/General/UpdateSettings.js | 1 + src/NzbDrone.Common/Extensions/PathExtensions.cs | 2 +- src/NzbDrone.Core/Localization/Core/en.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/Settings/General/UpdateSettings.js b/frontend/src/Settings/General/UpdateSettings.js index 240aee544..d52566fc6 100644 --- a/frontend/src/Settings/General/UpdateSettings.js +++ b/frontend/src/Settings/General/UpdateSettings.js @@ -91,6 +91,7 @@ function UpdateSettings(props) { type={inputTypes.CHECK} name="updateAutomatically" helpText={translate('UpdateAutomaticallyHelpText')} + helpTextWarning={updateMechanism.value === 'docker' ? translate('AutomaticUpdatesDisabledDocker', { appName: 'Lidarr' }) : undefined} onChange={onInputChange} {...updateAutomatically} /> diff --git a/src/NzbDrone.Common/Extensions/PathExtensions.cs b/src/NzbDrone.Common/Extensions/PathExtensions.cs index e10884da6..80c8ada78 100644 --- a/src/NzbDrone.Common/Extensions/PathExtensions.cs +++ b/src/NzbDrone.Common/Extensions/PathExtensions.cs @@ -139,7 +139,7 @@ namespace NzbDrone.Common.Extensions public static bool IsPathValid(this string path, PathValidationType validationType) { - if (path.ContainsInvalidPathChars() || string.IsNullOrWhiteSpace(path)) + if (string.IsNullOrWhiteSpace(path) || path.ContainsInvalidPathChars()) { return false; } diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 8be229dde..cca36077c 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -101,6 +101,7 @@ "AutoRedownloadFailedHelpText": "Automatically search for and attempt to download a different release", "Automatic": "Automatic", "AutomaticAdd": "Automatic Add", + "AutomaticUpdatesDisabledDocker": "Automatic updates are not directly supported when using the Docker update mechanism. You will need to update the container image outside of {appName} or use a script", "AutomaticallySwitchRelease": "Automatically Switch Release", "Backup": "Backup", "BackupFolderHelpText": "Relative paths will be under Lidarr's AppData directory",