Don't even call update if list cleaning disabled

pull/4802/head
Qstick 4 years ago
parent 0bb5dfc3d2
commit 41fc244bda

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

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

Loading…
Cancel
Save