diff --git a/src/Jackett.Common/Indexers/DarmoweTorrenty.cs b/src/Jackett.Common/Indexers/DarmoweTorrenty.cs index 04ebdd892..b1a52564b 100644 --- a/src/Jackett.Common/Indexers/DarmoweTorrenty.cs +++ b/src/Jackett.Common/Indexers/DarmoweTorrenty.cs @@ -39,9 +39,9 @@ namespace Jackett.Common.Indexers private static readonly Regex _DateRegex = new Regex("Dodano: (\\d{2}\\/\\d{2}\\/\\d{4})", RegexOptions.Compiled); private static readonly Regex _SeedsRegex = new Regex("Seedów: (\\d+)", RegexOptions.Compiled); private static readonly Regex _LeechersRegex = new Regex("Leecherów: (\\d+)", RegexOptions.Compiled); - private new ConfigurationDataBasicLoginWithRSSAndDisplay configData + private new ConfigurationDataBasicLogin configData { - get => (ConfigurationDataBasicLoginWithRSSAndDisplay)base.configData; + get => (ConfigurationDataBasicLogin)base.configData; set => base.configData = value; } @@ -52,7 +52,7 @@ namespace Jackett.Common.Indexers logger: l, p: ps, cacheService: cs, - configData: new ConfigurationDataBasicLoginWithRSSAndDisplay()) + configData: new ConfigurationDataBasicLogin()) { } diff --git a/src/Jackett.Common/Indexers/PirateTheNet.cs b/src/Jackett.Common/Indexers/PirateTheNet.cs index f084c6912..cc29dc0f7 100644 --- a/src/Jackett.Common/Indexers/PirateTheNet.cs +++ b/src/Jackett.Common/Indexers/PirateTheNet.cs @@ -34,9 +34,9 @@ namespace Jackett.Common.Indexers private string LoginUrl => SiteLink + "takelogin.php"; private string CaptchaUrl => SiteLink + "simpleCaptcha.php?numImages=1"; - private new ConfigurationDataBasicLoginWithRSSAndDisplay configData + private new ConfigurationDataBasicLogin configData { - get => (ConfigurationDataBasicLoginWithRSSAndDisplay)base.configData; + get => (ConfigurationDataBasicLogin)base.configData; set => base.configData = value; } @@ -47,7 +47,7 @@ namespace Jackett.Common.Indexers logger: l, p: ps, cacheService: cs, - configData: new ConfigurationDataBasicLoginWithRSSAndDisplay("Only the results from the first search result page are shown, adjust your profile settings to show the maximum.")) + configData: new ConfigurationDataBasicLogin("Only the results from the first search result page are shown, adjust your profile settings to show the maximum.")) { } @@ -98,8 +98,8 @@ namespace Jackett.Common.Indexers var result2 = await RequestLoginAndFollowRedirect(LoginUrl, pairs, result1.Cookies, true, null, null, true); - await ConfigureIfOK(result2.Cookies, result2.ContentString.Contains("logout.php"), () => - throw new ExceptionWithConfigData("Login Failed", configData)); + await ConfigureIfOK(result2.Cookies, result2.ContentString.Contains("logout.php"), () => throw new ExceptionWithConfigData("Login Failed", configData)); + return IndexerConfigurationStatus.RequiresTesting; } diff --git a/src/Jackett.Common/Indexers/Shazbat.cs b/src/Jackett.Common/Indexers/Shazbat.cs index 2c87d0e67..de8ec79e2 100644 --- a/src/Jackett.Common/Indexers/Shazbat.cs +++ b/src/Jackett.Common/Indexers/Shazbat.cs @@ -32,7 +32,6 @@ namespace Jackett.Common.Indexers private string SearchUrl => SiteLink + "search"; private string TorrentsUrl => SiteLink + "torrents"; private string ShowUrl => SiteLink + "show"; - private string RSSProfile => SiteLink + "rss_feeds"; private new ConfigurationDataShazbat configData => (ConfigurationDataShazbat)base.configData; @@ -87,16 +86,6 @@ namespace Jackett.Common.Indexers throw new ExceptionWithConfigData("The username and password entered do not match.", configData); }); - var rssProfile = await RequestWithCookiesAndRetryAsync(RSSProfile); - var parser = new HtmlParser(); - var rssDom = parser.ParseDocument(rssProfile.ContentString); - - configData.RSSKey.Value = rssDom.QuerySelector(".col-sm-9:nth-of-type(1)")?.TextContent.Trim(); - if (string.IsNullOrWhiteSpace(configData.RSSKey.Value)) - throw new ExceptionWithConfigData("Failed to find RSS key.", configData); - - SaveConfig(); - return IndexerConfigurationStatus.RequiresTesting; } diff --git a/src/Jackett.Common/Indexers/TorrentNetwork.cs b/src/Jackett.Common/Indexers/TorrentNetwork.cs index 4933125fe..c71cf3610 100644 --- a/src/Jackett.Common/Indexers/TorrentNetwork.cs +++ b/src/Jackett.Common/Indexers/TorrentNetwork.cs @@ -36,9 +36,9 @@ namespace Jackett.Common.Indexers {"Content-Type", "application/json"} }; - private new ConfigurationDataBasicLoginWithRSSAndDisplay configData + private new ConfigurationDataBasicLogin configData { - get => (ConfigurationDataBasicLoginWithRSSAndDisplay)base.configData; + get => (ConfigurationDataBasicLogin)base.configData; set => base.configData = value; } @@ -48,7 +48,7 @@ namespace Jackett.Common.Indexers logger: l, p: ps, cacheService: cs, - configData: new ConfigurationDataBasicLoginWithRSSAndDisplay()) + configData: new ConfigurationDataBasicLogin()) { configData.AddDynamic("token", new HiddenStringConfigurationItem("token")); configData.AddDynamic("passkey", new HiddenStringConfigurationItem("passkey")); diff --git a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataShazbat.cs b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataShazbat.cs index 36c740892..e3701123d 100644 --- a/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataShazbat.cs +++ b/src/Jackett.Common/Models/IndexerConfig/Bespoke/ConfigurationDataShazbat.cs @@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis; namespace Jackett.Common.Models.IndexerConfig.Bespoke { [ExcludeFromCodeCoverage] - internal class ConfigurationDataShazbat : ConfigurationDataBasicLoginWithRSS + internal class ConfigurationDataShazbat : ConfigurationDataBasicLogin { public SingleSelectConfigurationItem ShowPagesFetchLimit { get; private set; } diff --git a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSS.cs b/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSS.cs deleted file mode 100644 index 90450f71f..000000000 --- a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSS.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace Jackett.Common.Models.IndexerConfig -{ - public class ConfigurationDataBasicLoginWithRSS : ConfigurationData - { - public StringConfigurationItem Username { get; private set; } - public StringConfigurationItem Password { get; private set; } - public HiddenStringConfigurationItem RSSKey { get; private set; } - - public ConfigurationDataBasicLoginWithRSS() - { - Username = new StringConfigurationItem("Username"); - Password = new StringConfigurationItem("Password"); - RSSKey = new HiddenStringConfigurationItem("RSSKey"); - } - } -} diff --git a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSSAndDisplay.cs b/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSSAndDisplay.cs deleted file mode 100644 index 5cb0e5bb4..000000000 --- a/src/Jackett.Common/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSSAndDisplay.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Jackett.Common.Models.IndexerConfig -{ - public class ConfigurationDataBasicLoginWithRSSAndDisplay : ConfigurationData - { - public StringConfigurationItem Username { get; private set; } - public StringConfigurationItem Password { get; private set; } - public HiddenStringConfigurationItem RSSKey { get; private set; } - public DisplayInfoConfigurationItem Instructions { get; private set; } - - public ConfigurationDataBasicLoginWithRSSAndDisplay(string instructionMessageOptional = null) - { - Username = new StringConfigurationItem("Username"); - Password = new StringConfigurationItem("Password"); - RSSKey = new HiddenStringConfigurationItem("RSSKey"); - Instructions = new DisplayInfoConfigurationItem("", instructionMessageOptional); - } - } -}