mirror of https://github.com/Radarr/Radarr
Should fix issue when history fails to capture a download item.
This commit is contained in:
parent
68a0ef65df
commit
dc7e75187c
|
@ -112,12 +112,26 @@ namespace NzbDrone.Core.Download
|
||||||
if (historyItem != null)
|
if (historyItem != null)
|
||||||
{
|
{
|
||||||
movie = _movieService.GetMovie(historyItem.MovieId);
|
movie = _movieService.GetMovie(historyItem.MovieId);
|
||||||
|
if (movie.HasFile)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (movie == null)
|
if (movie == null)
|
||||||
{
|
{
|
||||||
trackedDownload.Warn("Movie title mismatch, automatic import is not possible.");
|
trackedDownload.Warn("Movie title mismatch, automatic import is not possible.");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//trackedDownload.Warn("Series title mismatch, automatic import is not possible.");
|
//trackedDownload.Warn("Series title mismatch, automatic import is not possible.");
|
||||||
|
|
Loading…
Reference in New Issue