mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Relative episode file paths
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.Disk;
|
||||
@@ -43,11 +44,12 @@ namespace NzbDrone.Core.MediaFiles
|
||||
foreach (var existingFile in existingFiles)
|
||||
{
|
||||
var file = existingFile.First();
|
||||
var episodeFilePath = Path.Combine(localEpisode.Series.Path, file.RelativePath);
|
||||
|
||||
if (_diskProvider.FileExists(file.Path))
|
||||
if (_diskProvider.FileExists(episodeFilePath))
|
||||
{
|
||||
_logger.Debug("Removing existing episode file: {0}", file);
|
||||
_recycleBinProvider.DeleteFile(file.Path);
|
||||
_recycleBinProvider.DeleteFile(episodeFilePath);
|
||||
}
|
||||
|
||||
moveFileResult.OldFiles.Add(file);
|
||||
|
||||
Reference in New Issue
Block a user