mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-23 00:03:05 +00:00
Adds exception to allow metadataSource to be blank (#115)
* Adds exception to allow metadataSource to be blank * Updates the exception to check for null or whitlespace to be more inclusive
This commit is contained in:
parent
f32e8974af
commit
ffa1eee367
1 changed files with 4 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using Lidarr.Http;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Validation;
|
||||
|
||||
namespace Lidarr.Api.V1.Config
|
||||
|
@ -11,7 +14,7 @@ public class MetadataProviderConfigModule : LidarrConfigModule<MetadataProviderC
|
|||
public MetadataProviderConfigModule(IConfigService 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)
|
||||
|
|
Loading…
Reference in a new issue