mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-16 15:29:40 +02:00
Fixed: Saving indexer, download client, etc settings
(cherry picked from commit 804a5921b3b620e2407d5d6a7fd69fb1fd9b0cbf)
This commit is contained in:
parent
b737f05a83
commit
78bc9f9b4b
@ -90,7 +90,9 @@ public ActionResult<TProviderResource> UpdateProvider([FromBody] TProviderResour
|
|||||||
var providerDefinition = GetDefinition(providerResource, existingDefinition, true, !forceSave, false);
|
var providerDefinition = GetDefinition(providerResource, existingDefinition, true, !forceSave, false);
|
||||||
|
|
||||||
// Comparing via JSON string to eliminate the need for every provider implementation to implement equality checks.
|
// 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.
|
// Only test existing definitions if it is enabled and forceSave isn't set or the definition has changed.
|
||||||
if (providerDefinition.Enable && (!forceSave || hasDefinitionChanged))
|
if (providerDefinition.Enable && (!forceSave || hasDefinitionChanged))
|
||||||
|
Loading…
Reference in New Issue
Block a user