1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2024-12-22 07:43:13 +00:00

Revert "xspeeds: fix for #15700"

This reverts commit 6fa840a70a.
This commit is contained in:
Garfield69 2024-11-10 17:41:21 +13:00
parent 6fa840a70a
commit 86da01df19

View file

@ -224,13 +224,13 @@ namespace Jackett.Common.Indexers.Definitions
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
{
var prevCook = CookieHeader + "";
var categoryMapping = MapTorznabCapsToTrackers(query).Distinct().ToList();
var queryCat = categoryMapping.FirstIfSingleOrDefault("0");
var searchParams = new Dictionary<string, string>
{
{ "do", "search" },
{ "category", queryCat }, // multi category search not supported
{ "category", categoryMapping.FirstIfSingleOrDefault("0") }, // multi category search not supported
{ "include_dead_torrents", "yes" }
};
@ -310,18 +310,10 @@ namespace Jackett.Common.Indexers.Definitions
var qPoster = row.QuerySelector("td:nth-of-type(2) .tooltip-content img");
if (qPoster != null)
release.Poster = new Uri(qPoster.GetAttribute("src"));
// for keywordless searches with a category query return the category query instead of the row category
// to prevent no results
if (string.IsNullOrWhiteSpace(searchString) && !queryCat.Equals("0"))
{
release.Category = MapTrackerCatToNewznab(queryCat);
}
else
{
var categoryLink = row.QuerySelector("td:nth-of-type(1) a").GetAttribute("href");
var cat = ParseUtil.GetArgumentFromQueryString(categoryLink, "category");
release.Category = MapTrackerCatToNewznab(cat);
}
var categoryLink = row.QuerySelector("td:nth-of-type(1) a").GetAttribute("href");
var cat = ParseUtil.GetArgumentFromQueryString(categoryLink, "category");
release.Category = MapTrackerCatToNewznab(cat);
var grabs = row.QuerySelector("td:nth-child(6)").TextContent;
release.Grabs = ParseUtil.CoerceInt(grabs);