From b2b1600ebe7f022a3248ea12b69553e2d51a3a7c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 9 Sep 2020 01:09:45 -0700 Subject: [PATCH] New: Don't forcibly retest indexers/download clients/connections on save if previously enabled Closes #1028 --- src/Sonarr.Api.V3/ProviderModuleBase.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sonarr.Api.V3/ProviderModuleBase.cs b/src/Sonarr.Api.V3/ProviderModuleBase.cs index 049bbc077..d15fdf51e 100644 --- a/src/Sonarr.Api.V3/ProviderModuleBase.cs +++ b/src/Sonarr.Api.V3/ProviderModuleBase.cs @@ -84,8 +84,10 @@ private int CreateProvider(TProviderResource providerResource) private void UpdateProvider(TProviderResource providerResource) { var providerDefinition = GetDefinition(providerResource, false); + var existingDefinition = _providerFactory.Get(providerDefinition.Id); - if (providerDefinition.Enable) + // Only test existing definitions if it was previously disabled + if (providerDefinition.Enable && !existingDefinition.Enable) { Test(providerDefinition, false); }