mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
Relative episode file paths
This commit is contained in:
parent
10fc875715
commit
6671934c0f
63 changed files with 571 additions and 464 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue