mirror of
https://github.com/Radarr/Radarr
synced 2025-01-01 21:04:22 +00:00
New: Don't clean moves if IMDB Match
This commit is contained in:
parent
b1b6a91db8
commit
c300af8241
1 changed files with 9 additions and 11 deletions
|
@ -135,7 +135,12 @@ public void Execute(NetImportSyncCommand message)
|
|||
|
||||
foreach (var movie in listedMovies)
|
||||
{
|
||||
var mapped = _movieSearch.MapMovieToTmdbMovie(movie);
|
||||
var mapped = movie;
|
||||
|
||||
if (mapped.TmdbId == 0)
|
||||
{
|
||||
mapped = _movieSearch.MapMovieToTmdbMovie(movie);
|
||||
}
|
||||
|
||||
if (mapped != null && mapped.TmdbId > 0)
|
||||
{
|
||||
|
@ -169,22 +174,15 @@ public void Execute(NetImportSyncCommand message)
|
|||
private void CleanLibrary(List<Movie> movies)
|
||||
{
|
||||
var moviesToUpdate = new List<Movie>();
|
||||
|
||||
if (_configService.ListSyncLevel != "disabled")
|
||||
{
|
||||
var moviesInLibrary = _movieService.GetAllMovies();
|
||||
foreach (var movie in moviesInLibrary)
|
||||
{
|
||||
bool foundMatch = false;
|
||||
foreach (var listedMovie in movies)
|
||||
{
|
||||
if (movie.TmdbId == listedMovie.TmdbId)
|
||||
{
|
||||
foundMatch = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var movieExists = movies.Any(c => c.TmdbId == movie.TmdbId || c.ImdbId == movie.ImdbId);
|
||||
|
||||
if (!foundMatch)
|
||||
if (!movieExists)
|
||||
{
|
||||
switch (_configService.ListSyncLevel)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue