|
|
@ -76,8 +76,10 @@ namespace Readarr.Api.V1
|
|
|
|
public ActionResult<TProviderResource> UpdateProvider(TProviderResource providerResource)
|
|
|
|
public ActionResult<TProviderResource> UpdateProvider(TProviderResource providerResource)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var providerDefinition = GetDefinition(providerResource, false);
|
|
|
|
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);
|
|
|
|
Test(providerDefinition, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|