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:
parent
797142d6f3
commit
4cbf5cfc57
|
@ -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 New Issue
Block a user