divxtotal: fix category search (#13197)

This commit is contained in:
Diego Heras 2022-04-24 21:42:14 +02:00 committed by GitHub
parent f9aa3c4d7b
commit ca65a2eebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -227,19 +227,14 @@ namespace Jackett.Common.Indexers
// match the words in the query with the titles
if (matchWords && !CheckTitleMatchWords(query.SearchTerm, title))
{
return releases;
}
var detailsStr = anchor.GetAttribute("href");
var cat = detailsStr.Split('/')[3];
var categories = MapTrackerCatToNewznab(cat);
// return results only for requested categories
if (query.Categories.Any() && !query.Categories.Contains(categories.First()))
{
if (query.Categories.Any() && !MapTorznabCapsToTrackers(query).Contains(cat))
return releases;
}
var publishStr = row.QuerySelectorAll("td")[2].TextContent.Trim();
var publishDate = TryToParseDate(publishStr, DateTime.Now);