From d34f1558b7b05c8d79905d8e7be599e6d12b049f Mon Sep 17 00:00:00 2001 From: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> Date: Wed, 19 Jan 2022 00:16:19 +0000 Subject: [PATCH] iptorrents: add sort setting. resolves #12853 (#12856) --- src/Jackett.Common/Indexers/IPTorrents.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Jackett.Common/Indexers/IPTorrents.cs b/src/Jackett.Common/Indexers/IPTorrents.cs index 77ca155ed..0455efdbb 100644 --- a/src/Jackett.Common/Indexers/IPTorrents.cs +++ b/src/Jackett.Common/Indexers/IPTorrents.cs @@ -87,6 +87,16 @@ namespace Jackett.Common.Indexers Language = "en-US"; Type = "private"; + var sort = new ConfigurationData.SingleSelectConfigurationItem("Sort requested from site", new Dictionary + { + {"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;