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/Rss/Plex/PlexRssImportSettings.cs

28 lines
876 B

using FluentValidation;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Validation;
namespace NzbDrone.Core.ImportLists.Rss.Plex
{
public class PlexRssImportSettingsValidator : AbstractValidator<PlexRssImportSettings>
{
public PlexRssImportSettingsValidator()
{
RuleFor(c => c.Url).NotEmpty();
}
}
public class PlexRssImportSettings : RssImportBaseSettings<PlexRssImportSettings>
{
private static readonly PlexRssImportSettingsValidator Validator = new ();
[FieldDefinition(0, Label = "Url", Type = FieldType.Textbox, HelpLink = "https://app.plex.tv/desktop/#!/settings/watchlist")]
public override string Url { get; set; }
public override NzbDroneValidationResult Validate()
{
return new NzbDroneValidationResult(Validator.Validate(this));
}
}
}