mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-22 22:43:31 -07:00
Added more checks when tracking downloads. It should work now, even if history was not present.
This commit is contained in:
parent
3a0278d0a1
commit
f481fe9ea9
1 changed files with 22 additions and 0 deletions
|
@ -126,6 +126,28 @@ namespace NzbDrone.Core.Download
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var parserResult = Parser.Parser.ParseMovieTitle(trackedDownload.DownloadItem.Title);
|
||||
if (parserResult != null)
|
||||
{
|
||||
movie = _movieService.FindByTitle(parserResult.MovieTitle);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (movie == null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue