diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs index ee3b00602..18d8f3513 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs @@ -68,30 +68,34 @@ namespace NzbDrone.Core.DecisionEngine { var parsedMovieInfo = Parser.Parser.ParseMovieTitle(report.Title); - if (parsedMovieInfo != null && !parsedMovieInfo.MovieTitle.IsNullOrWhiteSpace()) - { - RemoteMovie remoteMovie = _parsingService.Map(parsedMovieInfo, report.ImdbId.ToString(), searchCriteria); - remoteMovie.Release = report; - - if (remoteMovie.Movie == null) - { - decision = new DownloadDecision(remoteMovie, new Rejection("Unknown movie. Movie found does not match wanted movie.")); - } - else - { - if (parsedMovieInfo.Quality.HardcodedSubs.IsNotNullOrWhiteSpace()) - { - remoteMovie.DownloadAllowed = true; - decision = new DownloadDecision(remoteMovie, new Rejection("Hardcoded subs found: " + parsedMovieInfo.Quality.HardcodedSubs)); - } - else - { - remoteMovie.DownloadAllowed = true; - decision = GetDecisionForReport(remoteMovie, searchCriteria); - } - - } - } + if (parsedMovieInfo != null && !parsedMovieInfo.MovieTitle.IsNullOrWhiteSpace()) + { + RemoteMovie remoteMovie = _parsingService.Map(parsedMovieInfo, report.ImdbId.ToString(), searchCriteria); + remoteMovie.Release = report; + + if (remoteMovie.Movie == null) + { + decision = new DownloadDecision(remoteMovie, new Rejection("Unknown movie. Movie found does not match wanted movie.")); + } + else + { + if (parsedMovieInfo.Quality.HardcodedSubs.IsNotNullOrWhiteSpace()) + { + remoteMovie.DownloadAllowed = true; + decision = new DownloadDecision(remoteMovie, new Rejection("Hardcoded subs found: " + parsedMovieInfo.Quality.HardcodedSubs)); + } + else + { + remoteMovie.DownloadAllowed = true; + decision = GetDecisionForReport(remoteMovie, searchCriteria); + } + + } + } + else + { + _logger.Trace("{0} could not be parsed :(.", report.Title); + } } catch (Exception e) { diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index c034722d7..cd8086d1e 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -426,7 +426,7 @@ namespace NzbDrone.Core.Parser movie = _movieService.FindByImdbId(imdbId); //Should fix practically all problems, where indexer is shite at adding correct imdbids to movies. - if (parsedMovieInfo.Year > 1800 && parsedMovieInfo.Year != movie.Year) + if (movie != null && parsedMovieInfo.Year > 1800 && parsedMovieInfo.Year != movie.Year) { movie = null; }