mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
New: Don't clean moves if IMDB Match
This commit is contained in:
parent
b1b6a91db8
commit
c300af8241
@ -135,7 +135,12 @@ public void Execute(NetImportSyncCommand message)
|
|||||||
|
|
||||||
foreach (var movie in listedMovies)
|
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)
|
if (mapped != null && mapped.TmdbId > 0)
|
||||||
{
|
{
|
||||||
@ -169,22 +174,15 @@ public void Execute(NetImportSyncCommand message)
|
|||||||
private void CleanLibrary(List<Movie> movies)
|
private void CleanLibrary(List<Movie> movies)
|
||||||
{
|
{
|
||||||
var moviesToUpdate = new List<Movie>();
|
var moviesToUpdate = new List<Movie>();
|
||||||
|
|
||||||
if (_configService.ListSyncLevel != "disabled")
|
if (_configService.ListSyncLevel != "disabled")
|
||||||
{
|
{
|
||||||
var moviesInLibrary = _movieService.GetAllMovies();
|
var moviesInLibrary = _movieService.GetAllMovies();
|
||||||
foreach (var movie in moviesInLibrary)
|
foreach (var movie in moviesInLibrary)
|
||||||
{
|
{
|
||||||
bool foundMatch = false;
|
var movieExists = movies.Any(c => c.TmdbId == movie.TmdbId || c.ImdbId == movie.ImdbId);
|
||||||
foreach (var listedMovie in movies)
|
|
||||||
{
|
|
||||||
if (movie.TmdbId == listedMovie.TmdbId)
|
|
||||||
{
|
|
||||||
foundMatch = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!foundMatch)
|
if (!movieExists)
|
||||||
{
|
{
|
||||||
switch (_configService.ListSyncLevel)
|
switch (_configService.ListSyncLevel)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user