mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-08 08:42:30 +01:00
Clear failed Application Status on successful Test
This commit is contained in:
parent
c74208f9de
commit
d70e08331f
1 changed files with 13 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentValidation.Results;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
|
@ -57,5 +58,17 @@ private IEnumerable<IApplication> FilterBlockedApplications(IEnumerable<IApplica
|
|||
yield return application;
|
||||
}
|
||||
}
|
||||
|
||||
public override ValidationResult Test(ApplicationDefinition definition)
|
||||
{
|
||||
var result = base.Test(definition);
|
||||
|
||||
if ((result == null || result.IsValid) && definition.Id != 0)
|
||||
{
|
||||
_applicationStatusService.RecordSuccess(definition.Id);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue