Fixed: Sync on a mass Indexer edit

This commit is contained in:
Qstick
2021-03-23 21:21:38 -04:00
parent 6f25e1e6a2
commit a3f7b169c9
3 changed files with 26 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ namespace NzbDrone.Core.Applications
IHandleAsync<ProviderDeletedEvent<IIndexer>>,
IHandleAsync<ProviderAddedEvent<IApplication>>,
IHandleAsync<ProviderUpdatedEvent<IIndexer>>,
IHandleAsync<ProviderBulkUpdatedEvent<IIndexer>>,
IHandleAsync<ApiKeyChangedEvent>,
IExecute<ApplicationIndexerSyncCommand>
{
@@ -86,6 +87,15 @@ namespace NzbDrone.Core.Applications
SyncIndexers(enabledApps, indexers);
}
public void HandleAsync(ProviderBulkUpdatedEvent<IIndexer> message)
{
var enabledApps = _applicationsFactory.SyncEnabled();
var indexers = message.Definitions.Select(d => (IndexerDefinition)d).ToList();
SyncIndexers(enabledApps, indexers);
}
public void Execute(ApplicationIndexerSyncCommand message)
{
var enabledApps = _applicationsFactory.SyncEnabled();