diff --git a/src/NzbDrone.Core/Applications/Lidarr/Lidarr.cs b/src/NzbDrone.Core/Applications/Lidarr/Lidarr.cs index 4af8bdaac..40dbec269 100644 --- a/src/NzbDrone.Core/Applications/Lidarr/Lidarr.cs +++ b/src/NzbDrone.Core/Applications/Lidarr/Lidarr.cs @@ -39,12 +39,14 @@ namespace NzbDrone.Core.Applications.Lidarr public override Dictionary GetIndexerMappings() { - var indexers = _lidarrV1Proxy.GetIndexers(Settings); + var indexers = _lidarrV1Proxy.GetIndexers(Settings) + .Where(i => i.Implementation == "Newznab" || i.Implementation == "Torznab"); + var mappings = new Dictionary(); foreach (var indexer in indexers) { - if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey").Value == _configFileProvider.ApiKey) + if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey")?.Value == _configFileProvider.ApiKey) { var match = AppIndexerRegex.Match((string)indexer.Fields.FirstOrDefault(x => x.Name == "baseUrl").Value); diff --git a/src/NzbDrone.Core/Applications/Radarr/Radarr.cs b/src/NzbDrone.Core/Applications/Radarr/Radarr.cs index 2bcf77397..7aa56f6b5 100644 --- a/src/NzbDrone.Core/Applications/Radarr/Radarr.cs +++ b/src/NzbDrone.Core/Applications/Radarr/Radarr.cs @@ -39,12 +39,14 @@ namespace NzbDrone.Core.Applications.Radarr public override Dictionary GetIndexerMappings() { - var indexers = _radarrV3Proxy.GetIndexers(Settings); + var indexers = _radarrV3Proxy.GetIndexers(Settings) + .Where(i => i.Implementation == "Newznab" || i.Implementation == "Torznab"); + var mappings = new Dictionary(); foreach (var indexer in indexers) { - if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey").Value == _configFileProvider.ApiKey) + if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey")?.Value == _configFileProvider.ApiKey) { var match = AppIndexerRegex.Match((string)indexer.Fields.FirstOrDefault(x => x.Name == "baseUrl").Value); diff --git a/src/NzbDrone.Core/Applications/Readarr/Readarr.cs b/src/NzbDrone.Core/Applications/Readarr/Readarr.cs index 8b665dac9..0f3c4f915 100644 --- a/src/NzbDrone.Core/Applications/Readarr/Readarr.cs +++ b/src/NzbDrone.Core/Applications/Readarr/Readarr.cs @@ -39,12 +39,14 @@ namespace NzbDrone.Core.Applications.Readarr public override Dictionary GetIndexerMappings() { - var indexers = _readarrV1Proxy.GetIndexers(Settings); + var indexers = _readarrV1Proxy.GetIndexers(Settings) + .Where(i => i.Implementation == "Newznab" || i.Implementation == "Torznab"); + var mappings = new Dictionary(); foreach (var indexer in indexers) { - if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey").Value == _configFileProvider.ApiKey) + if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey")?.Value == _configFileProvider.ApiKey) { var match = AppIndexerRegex.Match((string)indexer.Fields.FirstOrDefault(x => x.Name == "baseUrl").Value); diff --git a/src/NzbDrone.Core/Applications/Sonarr/Sonarr.cs b/src/NzbDrone.Core/Applications/Sonarr/Sonarr.cs index 50df48a9a..dcc6c9d53 100644 --- a/src/NzbDrone.Core/Applications/Sonarr/Sonarr.cs +++ b/src/NzbDrone.Core/Applications/Sonarr/Sonarr.cs @@ -39,12 +39,14 @@ namespace NzbDrone.Core.Applications.Sonarr public override Dictionary GetIndexerMappings() { - var indexers = _sonarrV3Proxy.GetIndexers(Settings); + var indexers = _sonarrV3Proxy.GetIndexers(Settings) + .Where(i => i.Implementation == "Newznab" || i.Implementation == "Torznab"); + var mappings = new Dictionary(); foreach (var indexer in indexers) { - if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey").Value == _configFileProvider.ApiKey) + if ((string)indexer.Fields.FirstOrDefault(x => x.Name == "apiKey")?.Value == _configFileProvider.ApiKey) { var match = AppIndexerRegex.Match((string)indexer.Fields.FirstOrDefault(x => x.Name == "baseUrl").Value);