Fixed: Adding movies with unknown items in queue

pull/7709/merge
Mark McDowall 5 months ago committed by Bogdan
parent 797142d6f3
commit 4cbf5cfc57

@ -25,6 +25,11 @@ namespace NzbDrone.Core.Download.Aggregation
public RemoteMovie Augment(RemoteMovie remoteMovie)
{
if (remoteMovie == null)
{
return null;
}
foreach (var augmenter in _augmenters)
{
try

@ -30,19 +30,21 @@ namespace NzbDrone.Core.Movies
private void HandleScanEvents(Movie movie)
{
if (movie.AddOptions == null)
var addOptions = movie.AddOptions;
if (addOptions == null)
{
return;
}
_logger.Info("[{0}] was recently added, performing post-add actions", movie.Title);
if (movie.AddOptions.SearchForMovie)
if (addOptions.SearchForMovie)
{
_commandQueueManager.Push(new MoviesSearchCommand { MovieIds = new List<int> { movie.Id } });
}
if (movie.AddOptions.Monitor == MonitorTypes.MovieAndCollection && movie.MovieMetadata.Value.CollectionTmdbId > 0)
if (addOptions.Monitor == MonitorTypes.MovieAndCollection && movie.MovieMetadata.Value.CollectionTmdbId > 0)
{
var collection = _collectionService.FindByTmdbId(movie.MovieMetadata.Value.CollectionTmdbId);
collection.Monitored = true;

Loading…
Cancel
Save