Don't even call update if list cleaning disabled

pull/2/head
Qstick 5 years ago
parent 0bb5dfc3d2
commit 41fc244bda

@ -116,7 +116,7 @@ namespace NzbDrone.Core.Test.NetImport
.Verify(v => v.GetAllMovies(), Times.Never()); .Verify(v => v.GetAllMovies(), Times.Never());
Mocker.GetMock<IMovieService>() Mocker.GetMock<IMovieService>()
.Verify(v => v.UpdateMovie(new List<Movie>(), true), Times.Once()); .Verify(v => v.UpdateMovie(new List<Movie>(), true), Times.Never());
} }
[Test] [Test]

@ -161,8 +161,11 @@ namespace NzbDrone.Core.NetImport
{ {
var moviesToUpdate = new List<Movie>(); var moviesToUpdate = new List<Movie>();
if (_configService.ListSyncLevel != "disabled") if (_configService.ListSyncLevel == "disabled")
{ {
return;
}
var moviesInLibrary = _movieService.GetAllMovies(); var moviesInLibrary = _movieService.GetAllMovies();
foreach (var movie in moviesInLibrary) foreach (var movie in moviesInLibrary)
{ {
@ -195,7 +198,6 @@ namespace NzbDrone.Core.NetImport
} }
} }
} }
}
_movieService.UpdateMovie(moviesToUpdate, true); _movieService.UpdateMovie(moviesToUpdate, true);
} }

Loading…
Cancel
Save