From ca03f21b03da8be1ca745dc9dd158d334eb6dc17 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sat, 14 Jan 2017 13:56:42 +0100 Subject: [PATCH] If this does not fix stuff with no history, I have no clue anymore. --- .../Download/CompletedDownloadService.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/NzbDrone.Core/Download/CompletedDownloadService.cs b/src/NzbDrone.Core/Download/CompletedDownloadService.cs index 16893cce8..3b00979dd 100644 --- a/src/NzbDrone.Core/Download/CompletedDownloadService.cs +++ b/src/NzbDrone.Core/Download/CompletedDownloadService.cs @@ -156,6 +156,22 @@ namespace NzbDrone.Core.Download return; } } + else + { + if (movie.MovieFile != null) + { + movie.MovieFile.LazyLoad(); + if (movie.MovieFile.Value != null) + { + _logger.Debug("File Title: {0}, download item title: {1}", Parser.Parser.CleanSeriesTitle(movie.MovieFile.Value.RelativePath), Parser.Parser.CleanSeriesTitle(trackedDownload.DownloadItem.Title)); + if (Parser.Parser.CleanSeriesTitle(movie.MovieFile.Value.RelativePath).Contains(Parser.Parser.CleanSeriesTitle(trackedDownload.DownloadItem.Title))) + { + trackedDownload.Warn("Seems like the movie already has a file associated with this download item. Maybe the History failed?"); + return; + } + } + } + } //trackedDownload.Warn("Series title mismatch, automatic import is not possible."); //return; }