Compare commits

...

3 Commits

Author SHA1 Message Date
Mark McDowall 72b142f6f3 fixup! Fixed: Skip invalid series paths during validation 2024-06-09 09:02:12 -07:00
Mark McDowall 1f46971f9a fixup! Fixed: Skip invalid series paths during validation 2024-06-07 15:41:51 -07:00
Mark McDowall d5b131cacd Fixed: Skip invalid series paths during validation 2024-06-03 16:17:20 -07:00
3 changed files with 14 additions and 3 deletions

View File

@ -37,6 +37,12 @@ namespace NzbDrone.Core.Tv
private void MoveSingleSeries(Series series, string sourcePath, string destinationPath, int? index = null, int? total = null)
{
if (!sourcePath.IsPathValid(PathValidationType.CurrentOs))
{
_logger.Warn("Folder '{0}' for '{1}' is invalid, unable to move series. Try moving files manually", sourcePath, series.Title);
return;
}
if (!_diskProvider.FolderExists(sourcePath))
{
_logger.Debug("Folder '{0}' for '{1}' does not exist, not moving.", sourcePath, series.Title);

View File

@ -1,4 +1,5 @@
using FluentValidation.Validators;
using FluentValidation.Validators;
using NzbDrone.Common.Disk;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.RootFolders;
@ -24,7 +25,7 @@ namespace NzbDrone.Core.Validation.Paths
context.MessageFormatter.AppendArgument("path", context.PropertyValue.ToString());
return !_rootFolderService.All().Exists(r => r.Path.PathEquals(context.PropertyValue.ToString()));
return !_rootFolderService.All().Exists(r => r.Path.IsPathValid(PathValidationType.CurrentOs) && r.Path.PathEquals(context.PropertyValue.ToString()));
}
}
}

View File

@ -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()));
}
}
}