Fixed: Mapping of Cardigann indexers on bulk edit

pull/2199/head
Bogdan 5 months ago
parent 33de32b138
commit b31b695887

@ -318,5 +318,24 @@ namespace NzbDrone.Core.Indexers
base.Update(definition); base.Update(definition);
} }
public override IEnumerable<IndexerDefinition> Update(IEnumerable<IndexerDefinition> 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);
}
} }
} }

@ -127,10 +127,12 @@ namespace NzbDrone.Core.ThingiProvider
public virtual IEnumerable<TProviderDefinition> Update(IEnumerable<TProviderDefinition> definitions) public virtual IEnumerable<TProviderDefinition> Update(IEnumerable<TProviderDefinition> definitions)
{ {
_providerRepository.UpdateMany(definitions.ToList()); var providerDefinitions = definitions.ToList();
_eventAggregator.PublishEvent(new ProviderBulkUpdatedEvent<TProvider>(definitions));
return definitions; _providerRepository.UpdateMany(providerDefinitions);
_eventAggregator.PublishEvent(new ProviderBulkUpdatedEvent<TProvider>(providerDefinitions));
return providerDefinitions;
} }
public void Delete(int id) public void Delete(int id)

Loading…
Cancel
Save