Fixed: Movies not being unmonitored when using clean library and lists.

Fixes #2584, Fixes #2906
This commit is contained in:
Leonardo Galli 2018-08-12 17:49:58 +02:00
parent efb4127c35
commit ad94a4a603
1 changed files with 4 additions and 0 deletions

View File

@ -175,6 +175,7 @@ namespace NzbDrone.Core.NetImport
private void CleanLibrary(List<Movie> movies) private void CleanLibrary(List<Movie> movies)
{ {
var moviesToUpdate = new List<Movie>();
if (_configService.ListSyncLevel != "disabled") if (_configService.ListSyncLevel != "disabled")
{ {
var moviesInLibrary = _movieService.GetAllMovies(); var moviesInLibrary = _movieService.GetAllMovies();
@ -200,6 +201,7 @@ namespace NzbDrone.Core.NetImport
case "keepAndUnmonitor": case "keepAndUnmonitor":
_logger.Info("{0} was in your library, but not found in your lists --> Keeping in library but Unmonitoring it", movie); _logger.Info("{0} was in your library, but not found in your lists --> Keeping in library but Unmonitoring it", movie);
movie.Monitored = false; movie.Monitored = false;
moviesToUpdate.Add(movie);
break; break;
case "removeAndKeep": case "removeAndKeep":
_logger.Info("{0} was in your library, but not found in your lists --> Removing from library (keeping files)", movie); _logger.Info("{0} was in your library, but not found in your lists --> Removing from library (keeping files)", movie);
@ -216,6 +218,8 @@ namespace NzbDrone.Core.NetImport
} }
} }
} }
_movieService.UpdateMovie(moviesToUpdate);
} }
} }
} }