new: smarter validation for newznab indexer settings

This commit is contained in:
kayone
2013-12-01 13:33:53 -08:00
parent 53cebdee17
commit be3ec7ddb8
8 changed files with 98 additions and 7 deletions
@@ -41,14 +41,14 @@ namespace NzbDrone.Core.Indexers
NewznabPreProcessor.Process(xml, url);
}
catch (ApiKeyException apiKeyException)
catch (ApiKeyException)
{
_logger.Warn("Indexer returned result for Newznab RSS URL, API Key appears to be invalid");
var apiKeyFailure = new ValidationFailure("ApiKey", "Invalid API Key");
throw new ValidationException(new List<ValidationFailure> { apiKeyFailure }.ToArray());
}
catch (Exception ex)
catch (Exception)
{
_logger.Warn("Indexer doesn't appear to be Newznab based");