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.
Radarr/src/NzbDrone.Core/ImportLists/StevenLu/StevenLuSettings.cs

33 lines
952 B

using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.ImportLists.StevenLu
{
public class StevenLuSettingsValidator : AbstractValidator<StevenLuSettings>
{
public StevenLuSettingsValidator()
{
RuleFor(c => c.Link).ValidRootUrl();
}
}
public class StevenLuSettings : ImportListSettingsBase<StevenLuSettings>
{
private static readonly StevenLuSettingsValidator Validator = new ();
public StevenLuSettings()
{
Link = "https://popular-movies-data.stevenlu.com/movies.json";
}
[FieldDefinition(0, Label = "URL", HelpText = "Don't change this unless you know what you are doing.")]
public string Link { get; set; }
public override NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}
}
}