Fixed: (AnimeBytes) Avoid specials for non-zero season searches

pull/2174/head
Bogdan 3 months ago
parent 942da3a5c0
commit a32ab3acfd

@ -227,7 +227,13 @@ namespace NzbDrone.Core.Indexers.Definitions
}
}
var queryCats = _capabilities.Categories.MapTorznabCapsToTrackers(searchCriteria.Categories);
var queryCats = _capabilities.Categories.MapTorznabCapsToTrackers(searchCriteria.Categories).Distinct().ToList();
if (queryCats.Any() && searchCriteria is TvSearchCriteria { Season: > 0 })
{
// Avoid searching for specials if it's a non-zero season search
queryCats.RemoveAll(cat => cat is "anime[tv_special]" or "anime[ova]" or "anime[ona]" or "anime[dvd_special]" or "anime[bd_special]");
}
if (queryCats.Any())
{
@ -246,9 +252,7 @@ namespace NzbDrone.Core.Indexers.Definitions
searchUrl += "?" + parameters.GetQueryString();
var request = new IndexerRequest(searchUrl, HttpAccept.Json);
yield return request;
yield return new IndexerRequest(searchUrl, HttpAccept.Json);
}
private static string CleanSearchTerm(string term)

Loading…
Cancel
Save