From 1a9ec4febde9efe753564d6fd3807fae1dcd5fa2 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 14 Sep 2023 17:50:54 +0300 Subject: [PATCH] Fixed: (Apps) Check if the indexers have valid settings --- src/NzbDrone.Core/Applications/ApplicationService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/NzbDrone.Core/Applications/ApplicationService.cs b/src/NzbDrone.Core/Applications/ApplicationService.cs index 419008f7f..097b701d1 100644 --- a/src/NzbDrone.Core/Applications/ApplicationService.cs +++ b/src/NzbDrone.Core/Applications/ApplicationService.cs @@ -202,9 +202,17 @@ namespace NzbDrone.Core.Applications private bool ShouldHandleIndexer(ProviderDefinition app, ProviderDefinition indexer) { + if (!indexer.Settings.Validate().IsValid) + { + _logger.Debug("Indexer {0} [{1}] has invalid settings.", indexer.Name, indexer.Id); + + return false; + } + if (app.Tags.Empty()) { _logger.Debug("No tags set to application {0}.", app.Name); + return true; } @@ -213,10 +221,12 @@ namespace NzbDrone.Core.Applications if (intersectingTags.Any()) { _logger.Debug("Application {0} and indexer {1} [{2}] have {3} intersecting (matching) tags.", app.Name, indexer.Name, indexer.Id, intersectingTags.Length); + return true; } _logger.Debug("Application {0} does not have any intersecting (matching) tags with {1} [{2}]. Indexer will neither be synced to nor removed from the application.", app.Name, indexer.Name, indexer.Id); + return false; }