mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Relative episode file paths
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.MediaFiles.Events;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Tv.Events;
|
||||
using NzbDrone.Common;
|
||||
|
||||
@@ -16,7 +18,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||
List<EpisodeFile> GetFilesBySeries(int seriesId);
|
||||
List<EpisodeFile> GetFilesBySeason(int seriesId, int seasonNumber);
|
||||
List<EpisodeFile> GetFilesWithoutMediaInfo();
|
||||
List<string> FilterExistingFiles(List<string> files, int seriesId);
|
||||
List<string> FilterExistingFiles(List<string> files, Series series);
|
||||
EpisodeFile Get(int id);
|
||||
List<EpisodeFile> Get(IEnumerable<int> ids);
|
||||
}
|
||||
@@ -68,9 +70,9 @@ namespace NzbDrone.Core.MediaFiles
|
||||
return _mediaFileRepository.GetFilesWithoutMediaInfo();
|
||||
}
|
||||
|
||||
public List<string> FilterExistingFiles(List<string> files, int seriesId)
|
||||
public List<string> FilterExistingFiles(List<string> files, Series series)
|
||||
{
|
||||
var seriesFiles = GetFilesBySeries(seriesId).Select(f => f.Path).ToList();
|
||||
var seriesFiles = GetFilesBySeries(series.Id).Select(f => Path.Combine(series.Path, f.RelativePath)).ToList();
|
||||
|
||||
if (!seriesFiles.Any()) return files;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user