diff --git a/src/NzbDrone.Core/Indexers/IndexerFactory.cs b/src/NzbDrone.Core/Indexers/IndexerFactory.cs index c67c7840e..71e7aabdc 100644 --- a/src/NzbDrone.Core/Indexers/IndexerFactory.cs +++ b/src/NzbDrone.Core/Indexers/IndexerFactory.cs @@ -318,5 +318,24 @@ namespace NzbDrone.Core.Indexers base.Update(definition); } + + public override IEnumerable Update(IEnumerable definitions) + { + var indexerDefinitions = definitions.ToList(); + + foreach (var definition in indexerDefinitions) + { + var provider = _providers.First(v => v.GetType().Name == definition.Implementation); + + SetProviderCharacteristics(provider, definition); + + if (definition.Implementation == nameof(Cardigann)) + { + MapCardigannDefinition(definition); + } + } + + return base.Update(indexerDefinitions); + } } } diff --git a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs index fad090940..73e82f30a 100644 --- a/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs +++ b/src/NzbDrone.Core/ThingiProvider/ProviderFactory.cs @@ -127,10 +127,12 @@ namespace NzbDrone.Core.ThingiProvider public virtual IEnumerable Update(IEnumerable definitions) { - _providerRepository.UpdateMany(definitions.ToList()); - _eventAggregator.PublishEvent(new ProviderBulkUpdatedEvent(definitions)); + var providerDefinitions = definitions.ToList(); - return definitions; + _providerRepository.UpdateMany(providerDefinitions); + _eventAggregator.PublishEvent(new ProviderBulkUpdatedEvent(providerDefinitions)); + + return providerDefinitions; } public void Delete(int id)