From f4fe18a4405e1a1aeef05b9ce2392c2986529c23 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sun, 4 Jun 2023 16:28:32 +0300 Subject: [PATCH] Require ApiKey for all actions in RadarrImport (cherry picked from commit 19b8fbe13bf584b915a05fe9fc87622adbaee0b7) Closes #8692 --- .../ImportLists/Radarr/RadarrImport.cs | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/NzbDrone.Core/ImportLists/Radarr/RadarrImport.cs b/src/NzbDrone.Core/ImportLists/Radarr/RadarrImport.cs index 637474ac9..1b64e8ac8 100644 --- a/src/NzbDrone.Core/ImportLists/Radarr/RadarrImport.cs +++ b/src/NzbDrone.Core/ImportLists/Radarr/RadarrImport.cs @@ -95,11 +95,11 @@ public override object RequestAction(string action, IDictionary return new { options = devices.OrderBy(d => d.Name, StringComparer.InvariantCultureIgnoreCase) - .Select(d => new - { - Value = d.Id, - Name = d.Name - }) + .Select(d => new + { + Value = d.Id, + Name = d.Name + }) }; } @@ -110,23 +110,21 @@ public override object RequestAction(string action, IDictionary return new { options = devices.OrderBy(d => d.Label, StringComparer.InvariantCultureIgnoreCase) - .Select(d => new - { - Value = d.Id, - Name = d.Label - }) + .Select(d => new + { + Value = d.Id, + Name = d.Label + }) }; } if (action == "getRootFolders") { - Settings.Validate().Filter("ApiKey").ThrowOnError(); - - var remoteRootfolders = _radarrV3Proxy.GetRootFolders(Settings); + var remoteRootFolders = _radarrV3Proxy.GetRootFolders(Settings); return new { - options = remoteRootfolders.OrderBy(d => d.Path, StringComparer.InvariantCultureIgnoreCase) + options = remoteRootFolders.OrderBy(d => d.Path, StringComparer.InvariantCultureIgnoreCase) .Select(d => new { Value = d.Path,