From 931cdacf6605d3e5f62d1a8bec5842307e5140e0 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Tue, 30 Jan 2018 12:59:45 +0100 Subject: [PATCH] Fixed: Error when Movie has no imdbid when searching Rargb Fixes #2090 --- .../Indexers/Rarbg/RarbgRequestGenerator.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs index c75ab0595..359ec411d 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs @@ -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) {