Fixed: Skip invalid series paths during validation
This commit is contained in:
parent
d9b771ab0b
commit
d5b131cacd
|
@ -1,5 +1,6 @@
|
|||
using System.Linq;
|
||||
using FluentValidation.Validators;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
|
@ -28,7 +29,10 @@ namespace NzbDrone.Core.Validation.Paths
|
|||
dynamic instance = context.ParentContext.InstanceToValidate;
|
||||
var instanceId = (int)instance.Id;
|
||||
|
||||
return !_seriesService.GetAllSeriesPaths().Any(s => s.Value.PathEquals(context.PropertyValue.ToString()) && s.Key != instanceId);
|
||||
// Skip the path for this series and any invalid paths
|
||||
return !_seriesService.GetAllSeriesPaths().Any(s => s.Key != instanceId &&
|
||||
s.Value.IsPathValid(PathValidationType.CurrentOs) &&
|
||||
s.Value.PathEquals(context.PropertyValue.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue