mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Fixed: Populate Info in Lookup Results if Existing Movie
This commit is contained in:
parent
63197d38ce
commit
c6baff9bce
@ -523,7 +523,7 @@ public List<Movie> SearchForNewMovie(string title)
|
||||
|
||||
var movieResults = response.Resource.results;
|
||||
|
||||
return movieResults.SelectList(MapMovie);
|
||||
return movieResults.SelectList(MapSearchResult);
|
||||
}
|
||||
catch (HttpException)
|
||||
{
|
||||
@ -536,6 +536,18 @@ public List<Movie> SearchForNewMovie(string title)
|
||||
}
|
||||
}
|
||||
|
||||
private Movie MapSearchResult(MovieResult result)
|
||||
{
|
||||
var movie = _movieService.FindByTmdbId(result.id);
|
||||
|
||||
if (movie == null)
|
||||
{
|
||||
movie = MapMovie(result);
|
||||
}
|
||||
|
||||
return movie;
|
||||
}
|
||||
|
||||
public Movie MapMovie(MovieResult result)
|
||||
{
|
||||
var imdbMovie = new Movie();
|
||||
|
Loading…
Reference in New Issue
Block a user