|
|
@ -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();
|
|
|
|