1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00

Track fully imported downloads in separate history table

New: Improved detection of already imported downloads
Closes #3554
This commit is contained in:
Mark McDowall
2020-03-03 18:09:29 -08:00
committed by Mark McDowall
parent 576275b6da
commit 770b89c2b3
59 changed files with 688 additions and 258 deletions
@@ -47,7 +47,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
}
var historyForEpisode = _historyService.FindByEpisodeId(episode.Id);
var lastGrabbed = historyForEpisode.FirstOrDefault(h => h.EventType == HistoryEventType.Grabbed);
var lastGrabbed = historyForEpisode.FirstOrDefault(h => h.EventType == EpisodeHistoryEventType.Grabbed);
if (lastGrabbed == null)
{
@@ -55,7 +55,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
}
var imported = historyForEpisode.FirstOrDefault(h =>
h.EventType == HistoryEventType.DownloadFolderImported &&
h.EventType == EpisodeHistoryEventType.DownloadFolderImported &&
h.DownloadId == lastGrabbed.DownloadId);
if (imported == null)