From 2dc848ca31afb53f0d59e85376c0b8654a5654de Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Fri, 11 May 2018 21:25:07 +0200 Subject: [PATCH] Fixed: Throwing error when indexer doesn't support a category. Now only warns the user. --- src/NzbDrone.Core/Indexers/Newznab/Newznab.cs | 4 +++- src/NzbDrone.Core/Indexers/Torznab/Torznab.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs index 038e3b894..9ef2905f4 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs @@ -116,7 +116,9 @@ namespace NzbDrone.Core.Indexers.Newznab if (notSupported.Any()) { - return new ValidationFailure(string.Empty, $"This indexer does not support the following categories: {string.Join(", ", notSupported)}"); + _logger.Warn($"{Definition.Name} does not support the following categories: {string.Join(", ", notSupported)}. You should probably remove them."); + if (notSupported.Count() == Settings.Categories.Count()) + return new ValidationFailure(string.Empty, $"This indexer does not support any of the selected categories! (You may need to turn on advanced settings to see them)"); } if (capabilities.SupportedSearchParameters != null && capabilities.SupportedSearchParameters.Contains("q")) diff --git a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs index 32af77d47..603aac978 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs @@ -106,7 +106,7 @@ namespace NzbDrone.Core.Indexers.Torznab if (notSupported.Any()) { - _logger.Warn($"{Definition.Name} does not support the following categories: {string.Join(", ", notSupported)}"); + _logger.Warn($"{Definition.Name} does not support the following categories: {string.Join(", ", notSupported)}. You should probably remove them."); if (notSupported.Count() == Settings.Categories.Count()) return new ValidationFailure(string.Empty, $"This indexer does not support any of the selected categories! (You may need to turn on advanced settings to see them)"); }