1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 17:59:14 +00:00

Fix: Deleted files were always ignored when deleted, ignoring AutoIgnorePreviouslyDownloadedEpisodes setting.

This commit is contained in:
Mark McDowall 2012-02-27 21:57:48 -08:00
parent 03a7643b75
commit 1f24e87421

View file

@ -6,6 +6,7 @@
using NLog;
using NzbDrone.Common;
using NzbDrone.Core.Model;
using NzbDrone.Core.Providers.Core;
using NzbDrone.Core.Repository;
namespace NzbDrone.Core.Providers
@ -21,12 +22,13 @@ public class DiskScanProvider
private readonly ExternalNotificationProvider _externalNotificationProvider;
private readonly DownloadProvider _downloadProvider;
private readonly SignalRProvider _signalRProvider;
private readonly ConfigProvider _configProvider;
[Inject]
public DiskScanProvider(DiskProvider diskProvider, EpisodeProvider episodeProvider,
SeriesProvider seriesProvider, MediaFileProvider mediaFileProvider,
ExternalNotificationProvider externalNotificationProvider, DownloadProvider downloadProvider,
SignalRProvider signalRProvider)
SignalRProvider signalRProvider, ConfigProvider configProvider)
{
_diskProvider = diskProvider;
_episodeProvider = episodeProvider;
@ -35,6 +37,7 @@ public DiskScanProvider(DiskProvider diskProvider, EpisodeProvider episodeProvid
_externalNotificationProvider = externalNotificationProvider;
_downloadProvider = downloadProvider;
_signalRProvider = signalRProvider;
_configProvider = configProvider;
}
public DiskScanProvider()
@ -231,7 +234,7 @@ public virtual void CleanUp(IList<EpisodeFile> files)
{
Logger.Trace("Setting EpisodeFileId for Episode: [{0}] to 0", episode.EpisodeId);
episode.EpisodeFileId = 0;
episode.Ignored = true;
episode.Ignored = _configProvider.AutoIgnorePreviouslyDownloadedEpisodes;
episode.GrabDate = null;
episode.PostDownloadStatus = PostDownloadStatusType.Unknown;
_episodeProvider.UpdateEpisode(episode);