You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
800 B
28 lines
800 B
using FluentValidation;
|
|
using NzbDrone.Core.Annotations;
|
|
using NzbDrone.Core.Validation;
|
|
|
|
namespace NzbDrone.Core.ImportLists.RadarrList
|
|
{
|
|
public class RadarrSettingsValidator : AbstractValidator<RadarrListSettings>
|
|
{
|
|
public RadarrSettingsValidator()
|
|
{
|
|
RuleFor(c => c.Url).ValidRootUrl();
|
|
}
|
|
}
|
|
|
|
public class RadarrListSettings : ImportListSettingsBase<RadarrListSettings>
|
|
{
|
|
private static readonly RadarrSettingsValidator Validator = new ();
|
|
|
|
[FieldDefinition(0, Label = "List URL", HelpText = "The URL for the movie list")]
|
|
public string Url { get; set; }
|
|
|
|
public override NzbDroneValidationResult Validate()
|
|
{
|
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|
}
|
|
}
|
|
}
|