iptorrents: add sort setting. resolves #12853 (#12856)

This commit is contained in:
ilike2burnthing
2022-01-19 00:16:19 +00:00
committed by GitHub
parent 2936a1c824
commit d34f1558b7

View File

@@ -87,6 +87,16 @@ namespace Jackett.Common.Indexers
Language = "en-US";
Type = "private";
var sort = new ConfigurationData.SingleSelectConfigurationItem("Sort requested from site", new Dictionary<string, string>
{
{"time", "created"},
{"size", "size"},
{"seeders", "seeders"},
{"name", "title"}
})
{ Value = "time" };
configData.AddDynamic("sort", sort);
configData.AddDynamic("freeleech", new BoolConfigurationItem("Search freeleech only") { Value = false });
AddCategoryMapping(72, TorznabCatType.Movies, "Movies");
@@ -201,6 +211,8 @@ namespace Jackett.Common.Indexers
if (((BoolConfigurationItem)configData.GetDynamic("freeleech")).Value)
qc.Add("free", "on");
qc.Add("o", ((SingleSelectConfigurationItem)configData.GetDynamic("sort")).Value);
var searchUrl = SearchUrl + "?" + qc.GetQueryString();
var response = await RequestWithCookiesAndRetryAsync(searchUrl, referer: SearchUrl);
var results = response.ContentString;