|
|
@ -9,8 +9,10 @@ namespace NzbDrone.Api.Config
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public DownloadClientConfigModule(IConfigService configService, RootFolderValidator rootFolderValidator, PathExistsValidator pathExistsValidator)
|
|
|
|
public DownloadClientConfigModule(IConfigService configService, RootFolderValidator rootFolderValidator, PathExistsValidator pathExistsValidator)
|
|
|
|
: base(configService)
|
|
|
|
: base(configService)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SharedValidator.RuleFor(c => c.DownloadedEpisodesFolder)
|
|
|
|
SharedValidator.RuleFor(c => c.DownloadedEpisodesFolder)
|
|
|
|
|
|
|
|
.Cascade(CascadeMode.StopOnFirstFailure)
|
|
|
|
|
|
|
|
.IsValidPath()
|
|
|
|
.SetValidator(rootFolderValidator)
|
|
|
|
.SetValidator(rootFolderValidator)
|
|
|
|
.SetValidator(pathExistsValidator)
|
|
|
|
.SetValidator(pathExistsValidator)
|
|
|
|
.When(c => !String.IsNullOrWhiteSpace(c.DownloadedEpisodesFolder));
|
|
|
|
.When(c => !String.IsNullOrWhiteSpace(c.DownloadedEpisodesFolder));
|
|
|
|