mirror of
https://github.com/Jackett/Jackett
synced 2025-02-25 23:52:53 +00:00
XSpeeds.cs - updated configuration data to give notification to use about the initial delay for handling the CloudFlare DDOS Redirection using a new ConfigurationData class that exploits the seemingly unused DisplayInfo
ConfigurationDataBaseicLoginWithRSSAndDisplay - a ConfigData class that provides a display item member. I am new to c# so I haven't figured out if I coud have avoided this by added it to the object after instantiation. Looks possible with expandoobject but I felt that would be changing too much
This commit is contained in:
parent
ce351dd3aa
commit
a856aba953
3 changed files with 33 additions and 5 deletions
|
@ -30,9 +30,9 @@ namespace Jackett.Indexers
|
||||||
string CommentUrl { get { return SiteLink + "details.php?id={0}"; } }
|
string CommentUrl { get { return SiteLink + "details.php?id={0}"; } }
|
||||||
string DownloadUrl { get { return SiteLink + "download.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; }
|
set { base.configData = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,10 @@ namespace Jackett.Indexers
|
||||||
client: wc,
|
client: wc,
|
||||||
logger: l,
|
logger: l,
|
||||||
p: ps,
|
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(70, TorznabCatType.TVAnime);
|
||||||
AddCategoryMapping(80, TorznabCatType.AudioAudiobook);
|
AddCategoryMapping(80, TorznabCatType.AudioAudiobook);
|
||||||
AddCategoryMapping(66, TorznabCatType.MoviesBluRay);
|
AddCategoryMapping(66, TorznabCatType.MoviesBluRay);
|
||||||
|
@ -85,7 +87,7 @@ namespace Jackett.Indexers
|
||||||
};
|
};
|
||||||
|
|
||||||
var result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, null, true, null, SiteLink, true);
|
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"), () =>
|
await ConfigureIfOK(result.Cookies, result.Content != null && result.Content.Contains("logout.php"), () =>
|
||||||
{
|
{
|
||||||
CQ dom = result.Content;
|
CQ dom = result.Content;
|
||||||
|
|
|
@ -213,6 +213,7 @@
|
||||||
<Compile Include="Models\IndexerConfig\Bespoke\ConfigurationDataBlueTigers.cs" />
|
<Compile Include="Models\IndexerConfig\Bespoke\ConfigurationDataBlueTigers.cs" />
|
||||||
<Compile Include="Models\IndexerConfig\ConfigurationDataBasicLoginWithFilter.cs" />
|
<Compile Include="Models\IndexerConfig\ConfigurationDataBasicLoginWithFilter.cs" />
|
||||||
<Compile Include="Models\IndexerConfig\ConfigurationDataAPIKey.cs" />
|
<Compile Include="Models\IndexerConfig\ConfigurationDataAPIKey.cs" />
|
||||||
|
<Compile Include="Models\IndexerConfig\ConfigurationDataBasicLoginWithRSSAndDisplay.cs" />
|
||||||
<Compile Include="Models\ManualSearchResult.cs" />
|
<Compile Include="Models\ManualSearchResult.cs" />
|
||||||
<Compile Include="Indexers\TVChaosUK.cs" />
|
<Compile Include="Indexers\TVChaosUK.cs" />
|
||||||
<Compile Include="Indexers\NCore.cs" />
|
<Compile Include="Indexers\NCore.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 = "" };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue