1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-01-19 14:11:40 +00:00

Catching HTTP Errors when adding movies from a list.

This commit is contained in:
Leonardo Galli 2017-04-08 13:50:18 +02:00
parent cb596488f2
commit b4bb8875d3

View file

@ -728,6 +728,8 @@ private static MediaCoverTypes MapCoverType(string coverType)
} }
public Movie MapMovieToTmdbMovie(Movie movie) public Movie MapMovieToTmdbMovie(Movie movie)
{
try
{ {
Movie newMovie = movie; Movie newMovie = movie;
if (movie.TmdbId > 0) if (movie.TmdbId > 0)
@ -763,5 +765,11 @@ public Movie MapMovieToTmdbMovie(Movie movie)
return newMovie; return newMovie;
} }
catch (Exception ex)
{
_logger.Warn(ex, "Couldn't map movie {0} to a movie on The Movie DB. It will not be added :(", movie.Title);
return null;
}
}
} }
} }