Support for Gazelle Indexers (RED, AR)

This commit is contained in:
Qstick
2021-02-14 00:47:21 -05:00
parent 0fb7168669
commit 30367b53fd
71 changed files with 1196 additions and 1933 deletions
@@ -0,0 +1,32 @@
using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.Indexers.BroadcastheNet
{
public class BroadcastheNetSettingsValidator : AbstractValidator<BroadcastheNetSettings>
{
public BroadcastheNetSettingsValidator()
{
RuleFor(c => c.ApiKey).NotEmpty();
}
}
public class BroadcastheNetSettings : IProviderConfig
{
private static readonly BroadcastheNetSettingsValidator Validator = new BroadcastheNetSettingsValidator();
public BroadcastheNetSettings()
{
}
[FieldDefinition(1, Label = "API Key", Privacy = PrivacyLevel.ApiKey)]
public string ApiKey { get; set; }
public NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}
}
}