mirror of https://github.com/Jackett/Jackett
gazelle: don't use usetoken=0 when useTokens is not enabled
See Prowlarr/Prowlarr#1668
This commit is contained in:
parent
8f260f7f97
commit
d634670ad8
|
@ -27,13 +27,13 @@ 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") + (usePassKey ? "&torrent_pass=" + configData.PassKey.Value : "") + (useAuthKey ? "&authkey=" + configData.AuthKey.Value : "") + "&id=";
|
||||
protected virtual string DownloadUrl => SiteLink + "torrents.php?action=download" + (useTokens ? "&usetoken=1" : "") + (usePassKey ? "&torrent_pass=" + configData.PassKey.Value : "") + (useAuthKey ? "&authkey=" + configData.AuthKey.Value : "") + "&id=";
|
||||
protected virtual string DetailsUrl => SiteLink + "torrents.php?torrentid=";
|
||||
protected virtual string PosterUrl => SiteLink;
|
||||
protected virtual string AuthorizationName => "Authorization";
|
||||
protected virtual string AuthorizationFormat => "{0}";
|
||||
protected virtual int ApiKeyLength => 41;
|
||||
protected virtual string FlipOptionalTokenString(string requestLink) => requestLink.Replace("usetoken=1", "usetoken=0");
|
||||
protected virtual string FlipOptionalTokenString(string requestLink) => requestLink.Replace("&usetoken=1", "");
|
||||
|
||||
protected bool useTokens;
|
||||
protected string cookie = "";
|
||||
|
@ -418,7 +418,7 @@ namespace Jackett.Common.Indexers.Abstract
|
|||
|| html.Contains("This torrent is too large.")
|
||||
|| html.Contains("You cannot use tokens here"))
|
||||
{
|
||||
// download again with usetoken=0
|
||||
// download again without usetoken=1
|
||||
var requestLinkNew = FlipOptionalTokenString(requestLink);
|
||||
content = await base.Download(new Uri(requestLinkNew), RequestType.GET, headers: headers);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Jackett.Common.Indexers
|
|||
protected override string APIUrl => SiteLink + "api.php";
|
||||
protected override string AuthorizationName => "X-API-Key";
|
||||
protected override int ApiKeyLength => 64;
|
||||
protected override string FlipOptionalTokenString(string requestLink) => requestLink.Replace("usetoken=1", "");
|
||||
protected override string FlipOptionalTokenString(string requestLink) => requestLink.Replace("&usetoken=1", "");
|
||||
public GazelleGamesApi(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps,
|
||||
ICacheService cs)
|
||||
: base(configService: configService,
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Jackett.Common.Indexers
|
|||
protected override string DownloadUrl => SiteLink + "ajax.php?action=download" + (useTokens ? "&usetoken=1" : "") + "&id=";
|
||||
protected override string AuthorizationFormat => "token {0}";
|
||||
protected override int ApiKeyLength => 118;
|
||||
protected override string FlipOptionalTokenString(string requestLink) => requestLink.Replace("usetoken=1", "");
|
||||
protected override string FlipOptionalTokenString(string requestLink) => requestLink.Replace("&usetoken=1", "");
|
||||
public Orpheus(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps,
|
||||
ICacheService cs)
|
||||
: base(configService: configService,
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace Jackett.Common.Indexers
|
|||
|
||||
public override TorznabCapabilities TorznabCaps => SetCapabilities();
|
||||
|
||||
protected override string DownloadUrl => SiteLink + "ajax.php?action=download&usetoken=" + (useTokens ? "1" : "0") + "&id=";
|
||||
protected override string DownloadUrl => SiteLink + "ajax.php?action=download" + (useTokens ? "&usetoken=1" : "") + "&id=";
|
||||
|
||||
public Redacted(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps, ICacheService cs)
|
||||
: base(configService: configService,
|
||||
|
|
Loading…
Reference in New Issue