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.
42 lines
1.0 KiB
42 lines
1.0 KiB
using System;
|
|
using FluentValidation;
|
|
using NzbDrone.Core.Annotations;
|
|
using NzbDrone.Core.ThingiProvider;
|
|
using NzbDrone.Core.Validation;
|
|
|
|
namespace NzbDrone.Core.Metadata.Consumers.MediaBrowser
|
|
{
|
|
public class MediaBrowserSettingsValidator : AbstractValidator<MediaBrowserMetadataSettings>
|
|
{
|
|
public MediaBrowserSettingsValidator()
|
|
{
|
|
}
|
|
}
|
|
|
|
public class MediaBrowserMetadataSettings : IProviderConfig
|
|
{
|
|
private static readonly MediaBrowserSettingsValidator Validator = new MediaBrowserSettingsValidator();
|
|
|
|
public MediaBrowserMetadataSettings()
|
|
{
|
|
SeriesMetadata = true;
|
|
}
|
|
|
|
[FieldDefinition(0, Label = "Series Metadata", Type = FieldType.Checkbox)]
|
|
public Boolean SeriesMetadata { get; set; }
|
|
|
|
public bool IsValid
|
|
{
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
public NzbDroneValidationResult Validate()
|
|
{
|
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
|
}
|
|
}
|
|
}
|