diff --git a/src/Jackett.Common/Indexers/PassThePopcorn.cs b/src/Jackett.Common/Indexers/PassThePopcorn.cs index af10d7701..43b085f16 100644 --- a/src/Jackett.Common/Indexers/PassThePopcorn.cs +++ b/src/Jackett.Common/Indexers/PassThePopcorn.cs @@ -22,6 +22,7 @@ namespace Jackett.Common.Indexers { private static string SearchUrl => "https://passthepopcorn.me/torrents.php"; private string AuthKey { get; set; } + private string PassKey { get; set; } // TODO: merge ConfigurationDataAPILoginWithUserAndPasskeyAndFilter class with with ConfigurationDataUserPasskey private new ConfigurationDataAPILoginWithUserAndPasskeyAndFilter configData @@ -123,6 +124,10 @@ namespace Jackett.Common.Indexers { //Iterate over the releases for each movie var jsResults = JObject.Parse(results.ContentString); + + AuthKey = (string)jsResults["AuthKey"]; + PassKey = (string)jsResults["PassKey"]; + foreach (var movie in jsResults["Movies"]) { var movieTitle = (string)movie["Title"]; @@ -142,7 +147,7 @@ namespace Jackett.Common.Indexers {"action", "download"}, {"id", torrentId}, {"authkey", AuthKey}, - {"torrent_pass", configData.Passkey.Value}, + {"torrent_pass", PassKey}, }; var free = !(torrent["FreeleechType"] is null); diff --git a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataAPILoginWithUserAndPasskeyAndFilter.cs b/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataAPILoginWithUserAndPasskeyAndFilter.cs index 257386561..2a79cb455 100644 --- a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataAPILoginWithUserAndPasskeyAndFilter.cs +++ b/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataAPILoginWithUserAndPasskeyAndFilter.cs @@ -2,7 +2,6 @@ namespace Jackett.Common.Models.IndexerConfig { public class ConfigurationDataAPILoginWithUserAndPasskeyAndFilter : ConfigurationData { - public StringItem Passkey { get; private set; } public DisplayItem KeyHint { get; private set; } public StringItem User { get; private set; } public StringItem Key { get; private set; } @@ -11,8 +10,6 @@ namespace Jackett.Common.Models.IndexerConfig public ConfigurationDataAPILoginWithUserAndPasskeyAndFilter(string FilterInstructions) { - Passkey = new StringItem { Name = "Passkey", Value = string.Empty }; - KeyHint = new DisplayItem("