From 7ca67fe57ad58f437dbb12de92a1ce613c48625b Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 5 Jan 2016 23:07:49 -0800 Subject: [PATCH] New: Special searching on RARBG --- .../Indexers/Rarbg/RarbgRequestGenerator.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs index 342e7d767..da4c9bba2 100644 --- a/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Rarbg/RarbgRequestGenerator.cs @@ -60,7 +60,17 @@ public virtual IndexerPageableRequestChain GetSearchRequests(AnimeEpisodeSearchC public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria) { - return new IndexerPageableRequestChain(); + var pageableRequests = new IndexerPageableRequestChain(); + + foreach (var queryTitle in searchCriteria.EpisodeQueryTitles) + { + var query = queryTitle.Replace('+', ' '); + query = System.Web.HttpUtility.UrlEncode(query); + + pageableRequests.Add(GetPagedRequests("search", searchCriteria.Series.TvdbId, query)); + } + + return pageableRequests; } private IEnumerable GetPagedRequests(string mode, int? tvdbId, string query, params object[] args)