mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-30 15:38:38 +02:00
Add option to search freeleech only on IPTorrents (#10871)
This commit is contained in:
@@ -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
|
||||
{
|
||||
@@ -86,6 +87,8 @@ namespace Jackett.Common.Indexers
|
||||
Language = "en-us";
|
||||
Type = "private";
|
||||
|
||||
configData.AddDynamic("freeleech", new BoolItem { Name = "Search freeleech only", Value = false });
|
||||
|
||||
AddCategoryMapping(72, TorznabCatType.Movies, "Movies");
|
||||
AddCategoryMapping(87, TorznabCatType.Movies3D, "Movie/3D");
|
||||
AddCategoryMapping(77, TorznabCatType.MoviesSD, "Movie/480p");
|
||||
@@ -194,6 +197,9 @@ namespace Jackett.Common.Indexers
|
||||
foreach (var cat in MapTorznabCapsToTrackers(query))
|
||||
qc.Add(cat, string.Empty);
|
||||
|
||||
if (((BoolItem)configData.GetDynamic("freeleech")).Value)
|
||||
qc.Add("free", "on");
|
||||
|
||||
var searchUrl = SearchUrl + "?" + qc.GetQueryString();
|
||||
var response = await RequestWithCookiesAndRetryAsync(searchUrl, referer: SearchUrl);
|
||||
var results = response.ContentString;
|
||||
|
Reference in New Issue
Block a user