2017-09-21 02:13:14 +00:00
|
|
|
using System.Linq;
|
|
|
|
using System.Reflection;
|
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
using Lidarr.Http;
|
2017-10-22 06:51:09 +00:00
|
|
|
using NzbDrone.Core.Validation;
|
2017-09-21 02:13:14 +00:00
|
|
|
|
|
|
|
namespace Lidarr.Api.V3.Config
|
|
|
|
{
|
|
|
|
public class MetadataProviderConfigModule : SonarrConfigModule<MetadataProviderConfigResource>
|
|
|
|
{
|
|
|
|
public MetadataProviderConfigModule(IConfigService configService)
|
|
|
|
: base(configService)
|
|
|
|
{
|
2017-10-22 06:51:09 +00:00
|
|
|
SharedValidator.RuleFor(c => c.MetadataSource).IsValidUrl();
|
2017-09-21 02:13:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected override MetadataProviderConfigResource ToResource(IConfigService model)
|
|
|
|
{
|
|
|
|
return MetadataProviderConfigResourceMapper.ToResource(model);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|