From 4c9f13cb2687b472d81cacf19a533813f1eed6c0 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 18 Apr 2015 22:56:36 -0700 Subject: [PATCH] Fixed: Testing indexers, connections and download clients --- src/NzbDrone.Api/ProviderModuleBase.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Api/ProviderModuleBase.cs b/src/NzbDrone.Api/ProviderModuleBase.cs index 3d12e8c10..a9bc6131a 100644 --- a/src/NzbDrone.Api/ProviderModuleBase.cs +++ b/src/NzbDrone.Api/ProviderModuleBase.cs @@ -76,7 +76,10 @@ private int CreateProvider(TProviderResource providerResource) { var providerDefinition = GetDefinition(providerResource, false); - Test(providerDefinition, false); + if (providerDefinition.Enable) + { + Test(providerDefinition, false); + } providerDefinition = _providerFactory.Create(providerDefinition); @@ -87,7 +90,10 @@ private void UpdateProvider(TProviderResource providerResource) { var providerDefinition = GetDefinition(providerResource, false); - Test(providerDefinition, false); + if (providerDefinition.Enable) + { + Test(providerDefinition, false); + } _providerFactory.Update(providerDefinition); } @@ -166,8 +172,6 @@ protected virtual void Validate(TProviderDefinition definition, bool includeWarn protected virtual void Test(TProviderDefinition definition, bool includeWarnings) { - if (!definition.Enable) return; - var validationResult = _providerFactory.Test(definition); VerifyValidationResult(validationResult, includeWarnings);