From b513fac2f7dd1647141037c9f2efbdc15ffa572e Mon Sep 17 00:00:00 2001 From: Steve Adams Date: Sun, 22 Aug 2021 12:59:53 +1000 Subject: [PATCH] Fixed: (HDBits) Not parsing the search term for TV (#444) * Fixing HDBits not parsing the search term * remove debug vars * Handle TVDB Properly --- .../Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs index dc035f32e..35c258a6f 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/HDBits/HDBitsRequestGenerator.cs @@ -78,19 +78,18 @@ namespace NzbDrone.Core.Indexers.HDBits { var pageableRequests = new IndexerPageableRequestChain(); var query = new TorrentQuery(); + var tvdbId = searchCriteria.TvdbId.GetValueOrDefault(0); if (searchCriteria.Categories?.Length > 0) { query.Category = Capabilities.Categories.MapTorznabCapsToTrackers(searchCriteria.Categories).Select(int.Parse).ToArray(); } - if (searchCriteria.TvdbId == 0 && searchCriteria.SearchTerm.IsNotNullOrWhiteSpace()) + if (tvdbId == 0 && searchCriteria.SearchTerm.IsNotNullOrWhiteSpace()) { query.Search = searchCriteria.SanitizedTvSearchString; } - var tvdbId = searchCriteria.TvdbId; - if (tvdbId != 0) { query.TvdbInfo = query.TvdbInfo ?? new TvdbInfo();