mirror of
https://github.com/Radarr/Radarr
synced 2025-02-21 13:57:02 +00:00
Fixed: Adding movies with unknown items in queue
This commit is contained in:
parent
797142d6f3
commit
4cbf5cfc57
2 changed files with 10 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue