2023-05-08 21:20:42 +00:00
|
|
|
using FluentValidation;
|
2015-03-14 14:44:34 +00:00
|
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Synology
|
|
|
|
{
|
|
|
|
public class SynologyIndexerSettingsValidator : AbstractValidator<SynologyIndexerSettings>
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-04-14 04:16:26 +00:00
|
|
|
public class SynologyIndexerSettings : NotificationSettingsBase<SynologyIndexerSettings>
|
2015-03-14 14:44:34 +00:00
|
|
|
{
|
2024-04-14 04:16:26 +00:00
|
|
|
private static readonly SynologyIndexerSettingsValidator Validator = new ();
|
2015-03-14 14:44:34 +00:00
|
|
|
|
|
|
|
public SynologyIndexerSettings()
|
|
|
|
{
|
|
|
|
UpdateLibrary = true;
|
|
|
|
}
|
|
|
|
|
2024-01-03 20:41:16 +00:00
|
|
|
[FieldDefinition(0, Label = "NotificationsSettingsUpdateLibrary", Type = FieldType.Checkbox, HelpText = "NotificationsSynologySettingsUpdateLibraryHelpText")]
|
2015-10-03 17:45:26 +00:00
|
|
|
public bool UpdateLibrary { get; set; }
|
2015-03-14 14:44:34 +00:00
|
|
|
|
2024-04-14 04:16:26 +00:00
|
|
|
public override NzbDroneValidationResult Validate()
|
2015-03-14 14:44:34 +00:00
|
|
|
{
|
|
|
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|