mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
* When category ids in the indexer are "strings" we create a unique hash to make it compatible with Torznab * This PR also fix several issues related to custom cats
This commit is contained in:
@@ -266,16 +266,8 @@ namespace Jackett.Common.Indexers
|
||||
if (query.Categories.Length == 0)
|
||||
return results;
|
||||
|
||||
// TODO: move this code to TorznabCapabilitiesCategories and use indexer tree instead of general
|
||||
// expand parent categories from the query
|
||||
var expandedQueryCats = new List<int>();
|
||||
foreach (var queryCategory in query.Categories)
|
||||
{
|
||||
expandedQueryCats.Add(queryCategory);
|
||||
var parentCat = TorznabCatType.ParentCats.FirstOrDefault(c => c.ID == queryCategory);
|
||||
if (parentCat != null)
|
||||
expandedQueryCats.AddRange(parentCat.SubCategories.Select(c => c.ID));
|
||||
}
|
||||
var expandedQueryCats = TorznabCaps.Categories.ExpandTorznabQueryCategories(query);
|
||||
|
||||
var filteredResults = results.Where(result =>
|
||||
result.Category?.Any() != true ||
|
||||
|
Reference in New Issue
Block a user