|
|
@ -1,22 +1,14 @@
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using FluentValidation;
|
|
|
|
using FluentValidation;
|
|
|
|
|
|
|
|
using FluentValidation.Results;
|
|
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
using NzbDrone.Core.Indexers.Settings;
|
|
|
|
using NzbDrone.Core.Indexers.Settings;
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Indexers.Cardigann
|
|
|
|
namespace NzbDrone.Core.Indexers.Cardigann
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class CardigannSettingsValidator : AbstractValidator<CardigannSettings>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public CardigannSettingsValidator()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class CardigannSettings : NoAuthTorrentBaseSettings
|
|
|
|
public class CardigannSettings : NoAuthTorrentBaseSettings
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private static readonly CardigannSettingsValidator Validator = new CardigannSettingsValidator();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public CardigannSettings()
|
|
|
|
public CardigannSettings()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ExtraFieldData = new Dictionary<string, object>();
|
|
|
|
ExtraFieldData = new Dictionary<string, object>();
|
|
|
@ -26,10 +18,5 @@ namespace NzbDrone.Core.Indexers.Cardigann
|
|
|
|
public string DefinitionFile { get; set; }
|
|
|
|
public string DefinitionFile { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Dictionary<string, object> ExtraFieldData { get; set; }
|
|
|
|
public Dictionary<string, object> ExtraFieldData { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public override NzbDroneValidationResult Validate()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|