|
|
@ -16,21 +16,21 @@ namespace NzbDrone.Core.Providers
|
|
|
|
public class DropFolderImportService : IDropFolderImportService
|
|
|
|
public class DropFolderImportService : IDropFolderImportService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private readonly DiskProvider _diskProvider;
|
|
|
|
private readonly DiskProvider _diskProvider;
|
|
|
|
private readonly DiskScanProvider _diskScanProvider;
|
|
|
|
private readonly IDiskScanService _diskScanService;
|
|
|
|
private readonly ISeriesService _seriesService;
|
|
|
|
private readonly ISeriesService _seriesService;
|
|
|
|
private readonly IMoveEpisodeFiles _episodeFileMover;
|
|
|
|
private readonly IMoveEpisodeFiles _episodeFileMover;
|
|
|
|
private readonly IParsingService _parsingService;
|
|
|
|
private readonly IParsingService _parsingService;
|
|
|
|
private readonly Logger _logger;
|
|
|
|
private readonly Logger _logger;
|
|
|
|
|
|
|
|
|
|
|
|
public DropFolderImportService(DiskProvider diskProvider,
|
|
|
|
public DropFolderImportService(DiskProvider diskProvider,
|
|
|
|
DiskScanProvider diskScanProvider,
|
|
|
|
IDiskScanService diskScanService,
|
|
|
|
ISeriesService seriesService,
|
|
|
|
ISeriesService seriesService,
|
|
|
|
IMoveEpisodeFiles episodeFileMover,
|
|
|
|
IMoveEpisodeFiles episodeFileMover,
|
|
|
|
IParsingService parsingService,
|
|
|
|
IParsingService parsingService,
|
|
|
|
Logger logger)
|
|
|
|
Logger logger)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
_diskScanProvider = diskScanProvider;
|
|
|
|
_diskScanService = diskScanService;
|
|
|
|
_seriesService = seriesService;
|
|
|
|
_seriesService = seriesService;
|
|
|
|
_episodeFileMover = episodeFileMover;
|
|
|
|
_episodeFileMover = episodeFileMover;
|
|
|
|
_parsingService = parsingService;
|
|
|
|
_parsingService = parsingService;
|
|
|
@ -54,7 +54,7 @@ namespace NzbDrone.Core.Providers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var videoFile in _diskScanProvider.GetVideoFiles(dropFolder, false))
|
|
|
|
foreach (var videoFile in _diskScanService.GetVideoFiles(dropFolder, false))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -86,7 +86,7 @@ namespace NzbDrone.Core.Providers
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var files = _diskScanProvider.GetVideoFiles(subfolderInfo.FullName);
|
|
|
|
var files = _diskScanService.GetVideoFiles(subfolderInfo.FullName);
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var file in files)
|
|
|
|
foreach (var file in files)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -109,7 +109,7 @@ namespace NzbDrone.Core.Providers
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var episodeFile = _diskScanProvider.ImportFile(series, videoFile);
|
|
|
|
var episodeFile = _diskScanService.ImportFile(series, videoFile);
|
|
|
|
|
|
|
|
|
|
|
|
if (episodeFile != null)
|
|
|
|
if (episodeFile != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|