diff --git a/src/Jackett/Indexers/XSpeeds.cs b/src/Jackett/Indexers/XSpeeds.cs index fd72894c8..d9f495fa9 100644 --- a/src/Jackett/Indexers/XSpeeds.cs +++ b/src/Jackett/Indexers/XSpeeds.cs @@ -30,9 +30,9 @@ namespace Jackett.Indexers string CommentUrl { get { return SiteLink + "details.php?id={0}"; } } string DownloadUrl { get { return SiteLink + "download.php?id={0}"; } } - new ConfigurationDataBasicLoginWithRSS configData + new ConfigurationDataBasicLoginWithRSSAndDisplay configData { - get { return (ConfigurationDataBasicLoginWithRSS)base.configData; } + get {return (ConfigurationDataBasicLoginWithRSSAndDisplay)base.configData; } set { base.configData = value; } } @@ -45,8 +45,10 @@ namespace Jackett.Indexers client: wc, logger: l, p: ps, - configData: new ConfigurationDataBasicLoginWithRSS()) + configData: new ConfigurationDataBasicLoginWithRSSAndDisplay()) { + this.configData.DisplayText.Value = "Expect an initial delay (often around 10 seconds) due to XSpeeds CloudFlare DDoS protection"; + this.configData.DisplayText.Name = "Notice"; AddCategoryMapping(70, TorznabCatType.TVAnime); AddCategoryMapping(80, TorznabCatType.AudioAudiobook); AddCategoryMapping(66, TorznabCatType.MoviesBluRay); @@ -73,7 +75,7 @@ namespace Jackett.Indexers AddCategoryMapping("Apps", TorznabCatType.PC); AddCategoryMapping("Music", TorznabCatType.Audio); AddCategoryMapping("Audiobooks", TorznabCatType.AudioAudiobook); - + } public async Task ApplyConfiguration(JToken configJson) @@ -85,7 +87,7 @@ namespace Jackett.Indexers }; var result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, null, true, null, SiteLink, true); - result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, result.Cookies, true, SearchUrl, SiteLink, true); + result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, result.Cookies, true, SearchUrl, SiteLink,true); await ConfigureIfOK(result.Cookies, result.Content != null && result.Content.Contains("logout.php"), () => { CQ dom = result.Content; diff --git a/src/Jackett/Jackett.csproj b/src/Jackett/Jackett.csproj index ec2350c60..4ed37bc95 100644 --- a/src/Jackett/Jackett.csproj +++ b/src/Jackett/Jackett.csproj @@ -213,6 +213,7 @@ + diff --git a/src/Jackett/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSSAndDisplay.cs b/src/Jackett/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSSAndDisplay.cs new file mode 100644 index 000000000..981d6117d --- /dev/null +++ b/src/Jackett/Models/IndexerConfig/ConfigurationDataBasicLoginWithRSSAndDisplay.cs @@ -0,0 +1,25 @@ +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Jackett.Models.IndexerConfig +{ + public class ConfigurationDataBasicLoginWithRSSAndDisplay : ConfigurationData + { + public StringItem Username { get; private set; } + public StringItem Password { get; private set; } + public HiddenItem RSSKey { get; private set; } + public DisplayItem DisplayText { get; private set; } + + public ConfigurationDataBasicLoginWithRSSAndDisplay() + { + Username = new StringItem { Name = "Username" }; + Password = new StringItem { Name = "Password" }; + RSSKey = new HiddenItem { Name = "RSSKey" }; + DisplayText = new DisplayItem(""){ Name = "" }; + } + } +}