mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Fail on Sync from GetIndexerMapping NullRef
This commit is contained in:
@@ -39,12 +39,14 @@ namespace NzbDrone.Core.Applications.Sonarr
|
||||
|
||||
public override Dictionary<int, int> GetIndexerMappings()
|
||||
{
|
||||
var indexers = _sonarrV3Proxy.GetIndexers(Settings);
|
||||
var indexers = _sonarrV3Proxy.GetIndexers(Settings)
|
||||
.Where(i => i.Implementation == "Newznab" || i.Implementation == "Torznab");
|
||||
|
||||
var mappings = new Dictionary<int, int>();
|
||||
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user