|
|
@ -17,6 +17,7 @@ namespace NzbDrone.Core.Applications
|
|
|
|
IHandleAsync<ProviderDeletedEvent<IIndexer>>,
|
|
|
|
IHandleAsync<ProviderDeletedEvent<IIndexer>>,
|
|
|
|
IHandleAsync<ProviderAddedEvent<IApplication>>,
|
|
|
|
IHandleAsync<ProviderAddedEvent<IApplication>>,
|
|
|
|
IHandleAsync<ProviderUpdatedEvent<IIndexer>>,
|
|
|
|
IHandleAsync<ProviderUpdatedEvent<IIndexer>>,
|
|
|
|
|
|
|
|
IHandleAsync<ProviderUpdatedEvent<IApplication>>,
|
|
|
|
IHandleAsync<ProviderBulkUpdatedEvent<IIndexer>>,
|
|
|
|
IHandleAsync<ProviderBulkUpdatedEvent<IIndexer>>,
|
|
|
|
IHandleAsync<ApiKeyChangedEvent>,
|
|
|
|
IHandleAsync<ApiKeyChangedEvent>,
|
|
|
|
IExecute<ApplicationIndexerSyncCommand>
|
|
|
|
IExecute<ApplicationIndexerSyncCommand>
|
|
|
@ -49,6 +50,19 @@ namespace NzbDrone.Core.Applications
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void HandleAsync(ProviderUpdatedEvent<IApplication> message)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var appDefinition = (ApplicationDefinition)message.Definition;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (appDefinition.Enable)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var app = _applicationsFactory.GetInstance(appDefinition);
|
|
|
|
|
|
|
|
var indexers = _indexerFactory.Enabled().Select(i => (IndexerDefinition)i.Definition).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SyncIndexers(new List<IApplication> { app }, indexers);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void HandleAsync(ProviderAddedEvent<IIndexer> message)
|
|
|
|
public void HandleAsync(ProviderAddedEvent<IIndexer> message)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var enabledApps = _applicationsFactory.SyncEnabled();
|
|
|
|
var enabledApps = _applicationsFactory.SyncEnabled();
|
|
|
|