mirror of https://github.com/Sonarr/Sonarr
29 lines
907 B
C#
29 lines
907 B
C#
using FluentValidation;
|
|
using NzbDrone.Core.Annotations;
|
|
using NzbDrone.Core.Validation;
|
|
|
|
namespace NzbDrone.Core.Notifications.Synology
|
|
{
|
|
public class SynologyIndexerSettingsValidator : AbstractValidator<SynologyIndexerSettings>
|
|
{
|
|
}
|
|
|
|
public class SynologyIndexerSettings : NotificationSettingsBase<SynologyIndexerSettings>
|
|
{
|
|
private static readonly SynologyIndexerSettingsValidator Validator = new ();
|
|
|
|
public SynologyIndexerSettings()
|
|
{
|
|
UpdateLibrary = true;
|
|
}
|
|
|
|
[FieldDefinition(0, Label = "NotificationsSettingsUpdateLibrary", Type = FieldType.Checkbox, HelpText = "NotificationsSynologySettingsUpdateLibraryHelpText")]
|
|
public bool UpdateLibrary { get; set; }
|
|
|
|
public override NzbDroneValidationResult Validate()
|
|
{
|
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|
}
|
|
}
|
|
}
|