mirror of https://github.com/Jackett/Jackett
brasiltracker: add freeleech search. #9456
This commit is contained in:
parent
fcb0eb5551
commit
874452e32c
|
@ -13,6 +13,7 @@ using Jackett.Common.Utils;
|
||||||
using Jackett.Common.Utils.Clients;
|
using Jackett.Common.Utils.Clients;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
|
||||||
|
|
||||||
namespace Jackett.Common.Indexers
|
namespace Jackett.Common.Indexers
|
||||||
{
|
{
|
||||||
|
@ -43,6 +44,7 @@ namespace Jackett.Common.Indexers
|
||||||
cacheService: cs,
|
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: 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()
|
private TorznabCapabilities SetCapabilities()
|
||||||
|
@ -148,6 +150,9 @@ namespace Jackett.Common.Indexers
|
||||||
if (query.IsGenreQuery)
|
if (query.IsGenreQuery)
|
||||||
queryCollection.Add("taglist", query.Genre);
|
queryCollection.Add("taglist", query.Genre);
|
||||||
|
|
||||||
|
if (((BoolConfigurationItem)configData.GetDynamic("freeleech")).Value)
|
||||||
|
queryCollection.Add("freetorrent", "1");
|
||||||
|
|
||||||
searchUrl += "?" + queryCollection.GetQueryString();
|
searchUrl += "?" + queryCollection.GetQueryString();
|
||||||
var results = await RequestWithCookiesAsync(searchUrl);
|
var results = await RequestWithCookiesAsync(searchUrl);
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue