1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-06-30 17:43:59 +02:00

Fixed: Adding movies with unknown items in queue

This commit is contained in:
Mark McDowall 2024-06-11 17:00:56 -07:00 committed by Bogdan
parent 797142d6f3
commit 4cbf5cfc57
2 changed files with 10 additions and 3 deletions

View File

@ -25,6 +25,11 @@ public RemoteMovieAggregationService(IEnumerable<IAggregateRemoteMovie> augmente
public RemoteMovie Augment(RemoteMovie remoteMovie)
{
if (remoteMovie == null)
{
return null;
}
foreach (var augmenter in _augmenters)
{
try

View File

@ -30,19 +30,21 @@ public MovieScannedHandler(IMovieService movieService,
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;