Fixed: (Apps) Ensure populated capabilities for Torznab/Newznab definitions

This commit is contained in:
Bogdan
2023-07-29 12:08:48 +03:00
parent cab50b35aa
commit 8b1dd78300
4 changed files with 13 additions and 16 deletions

View File

@@ -67,10 +67,11 @@ namespace NzbDrone.Core.Applications
public void HandleAsync(ProviderAddedEvent<IIndexer> message)
{
var enabledApps = _applicationsFactory.SyncEnabled();
var indexer = _indexerFactory.GetInstance((IndexerDefinition)message.Definition);
foreach (var app in enabledApps)
{
if (ShouldHandleIndexer(app.Definition, message.Definition))
if (ShouldHandleIndexer(app.Definition, indexer.Definition))
{
ExecuteAction(a => a.AddIndexer((IndexerDefinition)message.Definition), app);
}
@@ -92,8 +93,9 @@ namespace NzbDrone.Core.Applications
var enabledApps = _applicationsFactory.SyncEnabled()
.Where(n => ((ApplicationDefinition)n.Definition).SyncLevel == ApplicationSyncLevel.FullSync)
.ToList();
var indexer = _indexerFactory.GetInstance((IndexerDefinition)message.Definition);
SyncIndexers(enabledApps, new List<IndexerDefinition> { (IndexerDefinition)message.Definition });
SyncIndexers(enabledApps, new List<IndexerDefinition> { (IndexerDefinition)indexer.Definition });
}
public void HandleAsync(ApiKeyChangedEvent message)