mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 04:21:27 +02:00
New: FlareSolverr Proxy Option
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.Validation;
|
||||
|
||||
namespace NzbDrone.Core.IndexerProxies.FlareSolverr
|
||||
{
|
||||
public class FlareSolverrSettingsValidator : AbstractValidator<FlareSolverrSettings>
|
||||
{
|
||||
public FlareSolverrSettingsValidator()
|
||||
{
|
||||
RuleFor(c => c.Host).NotEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
public class FlareSolverrSettings : IIndexerProxySettings
|
||||
{
|
||||
private static readonly FlareSolverrSettingsValidator Validator = new FlareSolverrSettingsValidator();
|
||||
|
||||
public FlareSolverrSettings()
|
||||
{
|
||||
Host = "http://localhost:8191/";
|
||||
}
|
||||
|
||||
[FieldDefinition(0, Label = "Host")]
|
||||
public string Host { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user