From e1b924ab08c772f22c5101fbd3d46937a76def78 Mon Sep 17 00:00:00 2001 From: 3744111 <37441111a@gmail.com> Date: Thu, 7 Apr 2022 21:59:53 -0400 Subject: [PATCH] Fixed: (Indexer) HDTorrents search imdbid + season/episode --- src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs b/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs index 3fdbc97cd..b17e0f518 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDTorrents.cs @@ -151,9 +151,11 @@ namespace NzbDrone.Core.Indexers.Definitions { var searchUrl = Settings.BaseUrl + "torrents.php?" + string.Join(string.Empty, Capabilities.Categories.MapTorznabCapsToTrackers(categories).Select(cat => $"category[]={cat}&")); + var search = new[] { imdbId, term }; + var queryCollection = new NameValueCollection { - { "search", imdbId ?? term }, + { "search", string.Join(" ", search.Where(s => !string.IsNullOrEmpty(s))) }, { "active", "0" }, { "options", "0" } }; @@ -188,7 +190,7 @@ namespace NzbDrone.Core.Indexers.Definitions { var pageableRequests = new IndexerPageableRequestChain(); - pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedSearchTerm), searchCriteria.Categories, searchCriteria.FullImdbId)); + pageableRequests.Add(GetPagedRequests(string.Format("{0}", searchCriteria.SanitizedTvSearchString), searchCriteria.Categories, searchCriteria.FullImdbId)); return pageableRequests; }