mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-15 21:14:32 +01:00
Fixed: (AnimeBytes) Avoid specials for non-zero season searches
This commit is contained in:
parent
942da3a5c0
commit
a32ab3acfd
1 changed files with 8 additions and 4 deletions
|
|
@ -227,7 +227,13 @@ private IEnumerable<IndexerRequest> GetRequest(SearchCriteriaBase searchCriteria
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ private IEnumerable<IndexerRequest> GetRequest(SearchCriteriaBase searchCriteria
|
|||
|
||||
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…
Reference in a new issue