2017-08-24 05:57:31 +00:00
|
|
|
|
using FluentValidation;
|
2015-03-14 14:44:34 +00:00
|
|
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Notifications.Synology
|
|
|
|
|
{
|
|
|
|
|
public class SynologyIndexerSettingsValidator : AbstractValidator<SynologyIndexerSettings>
|
|
|
|
|
{
|
|
|
|
|
public SynologyIndexerSettingsValidator()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SynologyIndexerSettings : IProviderConfig
|
|
|
|
|
{
|
|
|
|
|
private static readonly SynologyIndexerSettingsValidator Validator = new SynologyIndexerSettingsValidator();
|
|
|
|
|
|
|
|
|
|
public SynologyIndexerSettings()
|
|
|
|
|
{
|
|
|
|
|
UpdateLibrary = true;
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-24 05:57:31 +00:00
|
|
|
|
[FieldDefinition(0, Label = "Update Library", Type = FieldType.Checkbox, HelpText = "Call synoindex on localhost to update a library file")]
|
2015-10-03 17:45:26 +00:00
|
|
|
|
public bool UpdateLibrary { get; set; }
|
2015-03-14 14:44:34 +00:00
|
|
|
|
|
|
|
|
|
public NzbDroneValidationResult Validate()
|
|
|
|
|
{
|
|
|
|
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|