brasiltracker: add freeleech search. #9456

This commit is contained in:
Garfield69 2023-03-28 06:43:51 +13:00
parent fcb0eb5551
commit 874452e32c
1 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,7 @@ using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using Newtonsoft.Json.Linq;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@ -43,6 +44,7 @@ namespace Jackett.Common.Indexers
cacheService: cs,
configData: new ConfigurationDataBasicLogin("BrasilTracker does not return categories in its search results.</br>To add to your Apps' Torznab indexer, replace all categories with 8000(Other).</br>For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile."))
{
configData.AddDynamic("freeleech", new BoolConfigurationItem("Search freeleech only") { Value = false });
}
private TorznabCapabilities SetCapabilities()
@ -148,6 +150,9 @@ namespace Jackett.Common.Indexers
if (query.IsGenreQuery)
queryCollection.Add("taglist", query.Genre);
if (((BoolConfigurationItem)configData.GetDynamic("freeleech")).Value)
queryCollection.Add("freetorrent", "1");
searchUrl += "?" + queryCollection.GetQueryString();
var results = await RequestWithCookiesAsync(searchUrl);
try