mirror of https://github.com/Radarr/Radarr
36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
|
using System;
|
|||
|
using FluentValidation;
|
|||
|
using FluentValidation.Results;
|
|||
|
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;
|
|||
|
}
|
|||
|
|
|||
|
[FieldDefinition(0, Label = "Update Library", Type = FieldType.Checkbox, HelpText = "Call synoindex on localhost to update a library file")]
|
|||
|
public Boolean UpdateLibrary { get; set; }
|
|||
|
|
|||
|
public NzbDroneValidationResult Validate()
|
|||
|
{
|
|||
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|