You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using FluentValidation;
|
|
|
|
|
using NzbDrone.Core.Annotations;
|
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Metadata.Consumers.Roksbox
|
|
|
|
|
{
|
|
|
|
|
public class RoksboxSettingsValidator : AbstractValidator<RoksboxMetadataSettings>
|
|
|
|
|
{
|
|
|
|
|
public RoksboxSettingsValidator()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class RoksboxMetadataSettings : IProviderConfig
|
|
|
|
|
{
|
|
|
|
|
private static readonly RoksboxSettingsValidator Validator = new RoksboxSettingsValidator();
|
|
|
|
|
|
|
|
|
|
public RoksboxMetadataSettings()
|
|
|
|
|
{
|
|
|
|
|
EpisodeMetadata = true;
|
|
|
|
|
SeriesImages = true;
|
|
|
|
|
SeasonImages = true;
|
|
|
|
|
EpisodeImages = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[FieldDefinition(0, Label = "Episode Metadata", Type = FieldType.Checkbox)]
|
|
|
|
|
public Boolean EpisodeMetadata { get; set; }
|
|
|
|
|
|
|
|
|
|
[FieldDefinition(1, Label = "Series Images", Type = FieldType.Checkbox)]
|
|
|
|
|
public Boolean SeriesImages { get; set; }
|
|
|
|
|
|
|
|
|
|
[FieldDefinition(2, Label = "Season Images", Type = FieldType.Checkbox)]
|
|
|
|
|
public Boolean SeasonImages { get; set; }
|
|
|
|
|
|
|
|
|
|
[FieldDefinition(3, Label = "Episode Images", Type = FieldType.Checkbox)]
|
|
|
|
|
public Boolean EpisodeImages { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool IsValid
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public NzbDroneValidationResult Validate()
|
|
|
|
|
{
|
|
|
|
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|