mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
@@ -24,7 +24,7 @@ namespace Jackett.Common.Indexers.Abstract
|
||||
{
|
||||
protected virtual string LoginUrl => SiteLink + "login.php";
|
||||
protected virtual string APIUrl => SiteLink + "ajax.php";
|
||||
protected virtual string DownloadUrl => SiteLink + "torrents.php?action=download&usetoken=" + (useTokens ? "1" : "0") + "&id=";
|
||||
protected virtual string DownloadUrl => SiteLink + "torrents.php?action=download&usetoken=" + (useTokens ? "1" : "0") + (usePassKey ? "&torrent_pass=" + configData.PassKey.Value : "") + "&id=";
|
||||
protected virtual string DetailsUrl => SiteLink + "torrents.php?torrentid=";
|
||||
|
||||
protected bool useTokens;
|
||||
@@ -32,6 +32,7 @@ namespace Jackett.Common.Indexers.Abstract
|
||||
|
||||
private readonly bool imdbInTags;
|
||||
private readonly bool useApiKey;
|
||||
private readonly bool usePassKey;
|
||||
|
||||
private new ConfigurationDataGazelleTracker configData => (ConfigurationDataGazelleTracker)base.configData;
|
||||
|
||||
@@ -39,7 +40,7 @@ namespace Jackett.Common.Indexers.Abstract
|
||||
IIndexerConfigurationService configService, WebClient client, Logger logger,
|
||||
IProtectionService p, ICacheService cs, TorznabCapabilities caps,
|
||||
bool supportsFreeleechTokens, bool imdbInTags = false, bool has2Fa = false,
|
||||
bool useApiKey = false, string instructionMessageOptional = null)
|
||||
bool useApiKey = false, bool usePassKey = false, string instructionMessageOptional = null)
|
||||
: base(id: id,
|
||||
name: name,
|
||||
description: description,
|
||||
@@ -51,12 +52,13 @@ namespace Jackett.Common.Indexers.Abstract
|
||||
p: p,
|
||||
cacheService: cs,
|
||||
configData: new ConfigurationDataGazelleTracker(
|
||||
has2Fa, supportsFreeleechTokens, useApiKey, instructionMessageOptional))
|
||||
has2Fa, supportsFreeleechTokens, useApiKey, usePassKey, instructionMessageOptional))
|
||||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
|
||||
this.imdbInTags = imdbInTags;
|
||||
this.useApiKey = useApiKey;
|
||||
this.usePassKey = usePassKey;
|
||||
}
|
||||
|
||||
public override void LoadValuesFromJson(JToken jsonConfig, bool useProtectionService = false)
|
||||
|
@@ -42,7 +42,8 @@ namespace Jackett.Common.Indexers
|
||||
p: ps,
|
||||
cs: cs,
|
||||
supportsFreeleechTokens: true,
|
||||
has2Fa: true)
|
||||
has2Fa: true,
|
||||
usePassKey: true)
|
||||
{
|
||||
Language = "en-us";
|
||||
Type = "private";
|
||||
|
@@ -8,13 +8,15 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
|
||||
public StringConfigurationItem Username { get; private set; }
|
||||
public PasswordConfigurationItem Password { get; private set; }
|
||||
public StringConfigurationItem ApiKey { get; private set; }
|
||||
public StringConfigurationItem PassKey { get; private set; }
|
||||
public DisplayInfoConfigurationItem CookieHint { get; private set; }
|
||||
public StringConfigurationItem CookieItem { get; private set; }
|
||||
public BoolConfigurationItem UseTokenItem { get; private set; }
|
||||
public DisplayInfoConfigurationItem Instructions { get; private set; }
|
||||
|
||||
public ConfigurationDataGazelleTracker(bool has2Fa = false, bool supportsFreeleechToken = false,
|
||||
bool useApiKey = false, string instructionMessageOptional = null)
|
||||
bool useApiKey = false, bool usePassKey = false,
|
||||
string instructionMessageOptional = null)
|
||||
{
|
||||
if (useApiKey)
|
||||
ApiKey = new StringConfigurationItem("APIKey");
|
||||
@@ -39,6 +41,9 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
|
||||
CookieItem = new StringConfigurationItem("Cookie") { Value = "" };
|
||||
}
|
||||
|
||||
if (usePassKey)
|
||||
PassKey = new StringConfigurationItem("Passkey");
|
||||
|
||||
if (supportsFreeleechToken)
|
||||
UseTokenItem = new BoolConfigurationItem("Use Freeleech Tokens when Available") { Value = false };
|
||||
|
||||
|
Reference in New Issue
Block a user