mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-23 14:41:27 +00:00
Fixed: Saving indexer, download client, etc settings
This commit is contained in:
parent
87ecbf39c1
commit
804a5921b3
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue