|
|
@ -5,6 +5,7 @@ using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
using NzbDrone.Core.Validation;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Music
|
|
|
|
namespace NzbDrone.Core.Music
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -17,7 +18,10 @@ namespace NzbDrone.Core.Music
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public AddArtistValidator(RootFolderValidator rootFolderValidator,
|
|
|
|
public AddArtistValidator(RootFolderValidator rootFolderValidator,
|
|
|
|
ArtistPathValidator artistPathValidator,
|
|
|
|
ArtistPathValidator artistPathValidator,
|
|
|
|
ArtistAncestorValidator artistAncestorValidator)
|
|
|
|
ArtistAncestorValidator artistAncestorValidator,
|
|
|
|
|
|
|
|
ProfileExistsValidator profileExistsValidator,
|
|
|
|
|
|
|
|
LanguageProfileExistsValidator languageProfileExistsValidator,
|
|
|
|
|
|
|
|
MetadataProfileExistsValidator metadataProfileExistsValidator)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RuleFor(c => c.Path).Cascade(CascadeMode.StopOnFirstFailure)
|
|
|
|
RuleFor(c => c.Path).Cascade(CascadeMode.StopOnFirstFailure)
|
|
|
|
.IsValidPath()
|
|
|
|
.IsValidPath()
|
|
|
@ -25,6 +29,12 @@ namespace NzbDrone.Core.Music
|
|
|
|
.SetValidator(artistPathValidator)
|
|
|
|
.SetValidator(artistPathValidator)
|
|
|
|
.SetValidator(artistAncestorValidator);
|
|
|
|
.SetValidator(artistAncestorValidator);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RuleFor(c => c.ProfileId).SetValidator(profileExistsValidator);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RuleFor(c => c.LanguageProfileId).SetValidator(languageProfileExistsValidator);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RuleFor(c => c.MetadataProfileId).SetValidator(metadataProfileExistsValidator);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|