|
|
@ -1,7 +1,10 @@
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Reflection;
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
using FluentValidation;
|
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
using Lidarr.Http;
|
|
|
|
using Lidarr.Http;
|
|
|
|
|
|
|
|
using NzbDrone.Common.Extensions;
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Lidarr.Api.V1.Config
|
|
|
|
namespace Lidarr.Api.V1.Config
|
|
|
@ -11,7 +14,7 @@ namespace Lidarr.Api.V1.Config
|
|
|
|
public MetadataProviderConfigModule(IConfigService configService)
|
|
|
|
public MetadataProviderConfigModule(IConfigService configService)
|
|
|
|
: base(configService)
|
|
|
|
: base(configService)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SharedValidator.RuleFor(c => c.MetadataSource).IsValidUrl();
|
|
|
|
SharedValidator.RuleFor(c => c.MetadataSource).IsValidUrl().When(c => !c.MetadataSource.IsNullOrWhiteSpace());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected override MetadataProviderConfigResource ToResource(IConfigService model)
|
|
|
|
protected override MetadataProviderConfigResource ToResource(IConfigService model)
|
|
|
|