Fixed: Error when Movie has no imdbid when searching Rargb

Fixes #2090
pull/2460/head
Leonardo Galli 7 years ago
parent 18c622de40
commit 931cdacf66

@ -82,7 +82,15 @@ namespace NzbDrone.Core.Indexers.Rarbg
requestBuilder.AddQueryParam("mode", "search");
requestBuilder.AddQueryParam("search_imdb", searchCriteria.Movie.ImdbId);
if (searchCriteria.Movie.ImdbId != null)
{
requestBuilder.AddQueryParam("search_imdb", searchCriteria.Movie.ImdbId);
}
else
{
requestBuilder.AddQueryParam("search_string", $"{searchCriteria.Movie.Title} {searchCriteria.Movie.Year}");
}
if (!Settings.RankedOnly)
{

Loading…
Cancel
Save