From 804a5921b3b620e2407d5d6a7fd69fb1fd9b0cbf Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 19 Nov 2023 11:13:11 -0800 Subject: [PATCH] Fixed: Saving indexer, download client, etc settings --- src/Sonarr.Api.V3/ProviderControllerBase.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sonarr.Api.V3/ProviderControllerBase.cs b/src/Sonarr.Api.V3/ProviderControllerBase.cs index 71230d36a..bc92070b1 100644 --- a/src/Sonarr.Api.V3/ProviderControllerBase.cs +++ b/src/Sonarr.Api.V3/ProviderControllerBase.cs @@ -91,7 +91,9 @@ namespace Sonarr.Api.V3 var providerDefinition = GetDefinition(providerResource, existingDefinition, true, !forceSave, false); // Comparing via JSON string to eliminate the need for every provider implementation to implement equality checks. - var hasDefinitionChanged = STJson.ToJson(existingDefinition) != STJson.ToJson(providerDefinition); + // Compare settings separately because they are not serialized with the definition. + var hasDefinitionChanged = STJson.ToJson(existingDefinition) != STJson.ToJson(providerDefinition) || + STJson.ToJson(existingDefinition.Settings) != STJson.ToJson(providerDefinition.Settings); // Only test existing definitions if it is enabled and forceSave isn't set or the definition has changed. if (providerDefinition.Enable && (!forceSave || hasDefinitionChanged))