Fixed: (HDBits) Not parsing the search term for TV (#444)

* Fixing HDBits not parsing the search term

* remove debug vars

* Handle TVDB Properly
pull/438/head
Steve Adams 3 years ago committed by GitHub
parent 368e0755a0
commit b513fac2f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,19 +78,18 @@ namespace NzbDrone.Core.Indexers.HDBits
{ {
var pageableRequests = new IndexerPageableRequestChain(); var pageableRequests = new IndexerPageableRequestChain();
var query = new TorrentQuery(); var query = new TorrentQuery();
var tvdbId = searchCriteria.TvdbId.GetValueOrDefault(0);
if (searchCriteria.Categories?.Length > 0) if (searchCriteria.Categories?.Length > 0)
{ {
query.Category = Capabilities.Categories.MapTorznabCapsToTrackers(searchCriteria.Categories).Select(int.Parse).ToArray(); 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; query.Search = searchCriteria.SanitizedTvSearchString;
} }
var tvdbId = searchCriteria.TvdbId;
if (tvdbId != 0) if (tvdbId != 0)
{ {
query.TvdbInfo = query.TvdbInfo ?? new TvdbInfo(); query.TvdbInfo = query.TvdbInfo ?? new TvdbInfo();

Loading…
Cancel
Save