|
|
@ -8,6 +8,7 @@ using NzbDrone.Core.Configuration;
|
|
|
|
using NzbDrone.Core.Instrumentation;
|
|
|
|
using NzbDrone.Core.Instrumentation;
|
|
|
|
using NzbDrone.Core.MediaFiles.Commands;
|
|
|
|
using NzbDrone.Core.MediaFiles.Commands;
|
|
|
|
using NzbDrone.Core.MediaFiles.EpisodeImport;
|
|
|
|
using NzbDrone.Core.MediaFiles.EpisodeImport;
|
|
|
|
|
|
|
|
using NzbDrone.Core.MediaFiles.Events;
|
|
|
|
using NzbDrone.Core.Messaging.Commands;
|
|
|
|
using NzbDrone.Core.Messaging.Commands;
|
|
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
using NzbDrone.Core.Tv;
|
|
|
|
using NzbDrone.Core.Tv;
|
|
|
@ -31,6 +32,7 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
private readonly ICommandExecutor _commandExecutor;
|
|
|
|
private readonly ICommandExecutor _commandExecutor;
|
|
|
|
private readonly IConfigService _configService;
|
|
|
|
private readonly IConfigService _configService;
|
|
|
|
private readonly ISeriesService _seriesService;
|
|
|
|
private readonly ISeriesService _seriesService;
|
|
|
|
|
|
|
|
private readonly IEventAggregator _eventAggregator;
|
|
|
|
private readonly Logger _logger;
|
|
|
|
private readonly Logger _logger;
|
|
|
|
|
|
|
|
|
|
|
|
public DiskScanService(IDiskProvider diskProvider,
|
|
|
|
public DiskScanService(IDiskProvider diskProvider,
|
|
|
@ -39,6 +41,7 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
ICommandExecutor commandExecutor,
|
|
|
|
ICommandExecutor commandExecutor,
|
|
|
|
IConfigService configService,
|
|
|
|
IConfigService configService,
|
|
|
|
ISeriesService seriesService,
|
|
|
|
ISeriesService seriesService,
|
|
|
|
|
|
|
|
IEventAggregator eventAggregator,
|
|
|
|
Logger logger)
|
|
|
|
Logger logger)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_diskProvider = diskProvider;
|
|
|
|
_diskProvider = diskProvider;
|
|
|
@ -47,6 +50,7 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
_commandExecutor = commandExecutor;
|
|
|
|
_commandExecutor = commandExecutor;
|
|
|
|
_configService = configService;
|
|
|
|
_configService = configService;
|
|
|
|
_seriesService = seriesService;
|
|
|
|
_seriesService = seriesService;
|
|
|
|
|
|
|
|
_eventAggregator = eventAggregator;
|
|
|
|
_logger = logger;
|
|
|
|
_logger = logger;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -75,7 +79,9 @@ namespace NzbDrone.Core.MediaFiles
|
|
|
|
|
|
|
|
|
|
|
|
var decisions = _importDecisionMaker.GetImportDecisions(mediaFileList, series, false);
|
|
|
|
var decisions = _importDecisionMaker.GetImportDecisions(mediaFileList, series, false);
|
|
|
|
_importApprovedEpisodes.Import(decisions);
|
|
|
|
_importApprovedEpisodes.Import(decisions);
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Info("Completed scanning disk for {0}", series.Title);
|
|
|
|
_logger.Info("Completed scanning disk for {0}", series.Title);
|
|
|
|
|
|
|
|
_eventAggregator.PublishEvent(new SeriesScannedEvent(series));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string[] GetVideoFiles(string path, bool allDirectories = true)
|
|
|
|
public string[] GetVideoFiles(string path, bool allDirectories = true)
|
|
|
|