mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-02 00:34:37 +02:00
Re-saving edited providers will forcibly save them
Fixes #5192 Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Validation;
|
||||
using Radarr.Http;
|
||||
using Radarr.Http.Extensions;
|
||||
|
||||
namespace Radarr.Api.V3
|
||||
{
|
||||
@@ -84,10 +85,10 @@ namespace Radarr.Api.V3
|
||||
private void UpdateProvider(TProviderResource providerResource)
|
||||
{
|
||||
var providerDefinition = GetDefinition(providerResource, false);
|
||||
var existingDefinition = _providerFactory.Get(providerDefinition.Id);
|
||||
var forceSave = Request.GetBooleanQueryParameter("forceSave");
|
||||
|
||||
// Only test existing definitions if it was previously disabled
|
||||
if (providerDefinition.Enable && !existingDefinition.Enable)
|
||||
// Only test existing definitions if it is enabled and forceSave isn't set.
|
||||
if (providerDefinition.Enable && !forceSave)
|
||||
{
|
||||
Test(providerDefinition, false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user