hdtorrents: add freeleech search. #9456 (#14200)

This commit is contained in:
ilike2burnthing 2023-03-31 19:51:26 +01:00 committed by GitHub
parent 7480740f1e
commit 242dcee190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,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
{
@ -60,6 +61,7 @@ namespace Jackett.Common.Indexers
cacheService: cs,
configData: new ConfigurationDataBasicLogin("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()
@ -144,7 +146,7 @@ namespace Jackett.Common.Indexers
var queryCollection = new NameValueCollection
{
{"search", query.ImdbID ?? query.GetQueryString()},
{"active", "0"},
{"active", ((BoolConfigurationItem)configData.GetDynamic("freeleech")).Value ? "5" : "0"},
{"options", "0"}
};