diff --git a/src/Jackett/Indexers/NCore.cs b/src/Jackett/Indexers/NCore.cs index bd8feacab..da4d440a6 100644 --- a/src/Jackett/Indexers/NCore.cs +++ b/src/Jackett/Indexers/NCore.cs @@ -99,6 +99,11 @@ namespace Jackett.Indexers { "submit", "Access!" } }; + if (!string.IsNullOrEmpty(configData.TwoFactor.Value)) + { + pairs.Add("2factor", configData.TwoFactor.Value); + } + var result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, loginPage.Cookies, true, referer: SiteLink); await ConfigureIfOK(result.Cookies, result.Content != null && result.Content.Contains("profile.php"), () => { diff --git a/src/Jackett/Models/IndexerConfig/Bespoke/ConfigurationDataNCore.cs b/src/Jackett/Models/IndexerConfig/Bespoke/ConfigurationDataNCore.cs index 886ae4d02..3fe1c1df5 100644 --- a/src/Jackett/Models/IndexerConfig/Bespoke/ConfigurationDataNCore.cs +++ b/src/Jackett/Models/IndexerConfig/Bespoke/ConfigurationDataNCore.cs @@ -13,6 +13,7 @@ namespace Jackett.Models.IndexerConfig.Bespoke { public StringItem Username { get; private set; } public StringItem Password { get; private set; } + public StringItem TwoFactor { get; private set; } public BoolItem Hungarian { get; set; } public BoolItem English { get; set; } @@ -20,6 +21,7 @@ namespace Jackett.Models.IndexerConfig.Bespoke { Username = new StringItem { Name = "Username", Value = "" }; Password = new StringItem { Name = "Password", Value = "" }; + TwoFactor = new StringItem { Name = "Twofactor", Value = "" }; Hungarian = new BoolItem { Name = "Hungarian", Value = true }; English = new BoolItem { Name = "English", Value = true }; } @@ -40,6 +42,9 @@ namespace Jackett.Models.IndexerConfig.Bespoke case "Password": Password = new StringItem { Name = propertyName, Value = config.value }; break; + case "Twofactor": + TwoFactor = new StringItem { Name = propertyName, Value = config.value }; + break; case "Hungarian": Hungarian = new BoolItem { Name = propertyName, Value = config.value }; break;