mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-29 21:49:13 +02:00
@@ -29,6 +29,7 @@ namespace Jackett.Common.Indexers.Abstract
|
||||
protected virtual string PosterUrl => SiteLink;
|
||||
protected virtual string AuthorizationFormat => "{0}";
|
||||
protected virtual int ApiKeyLength => 41;
|
||||
protected virtual string FlipOptionalTokenString(string requestLink) => requestLink.Replace("usetoken=1", "usetoken=0");
|
||||
|
||||
protected bool useTokens;
|
||||
protected string cookie = "";
|
||||
@@ -395,10 +396,11 @@ namespace Jackett.Common.Indexers.Abstract
|
||||
var html = Encoding.GetString(content);
|
||||
if (html.Contains("You do not have any freeleech tokens left.")
|
||||
|| html.Contains("You do not have enough freeleech tokens")
|
||||
|| html.Contains("This torrent is too large."))
|
||||
|| html.Contains("This torrent is too large.")
|
||||
|| html.Contains("You cannot use tokens here"))
|
||||
{
|
||||
// download again with usetoken=0
|
||||
var requestLinkNew = requestLink.Replace("usetoken=1", "usetoken=0");
|
||||
var requestLinkNew = FlipOptionalTokenString(requestLink);
|
||||
content = await base.Download(new Uri(requestLinkNew), RequestType.GET, headers: headers);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user