mirror of https://github.com/Jackett/Jackett
parent
4daed9ea70
commit
c991d27b85
|
@ -381,7 +381,7 @@ namespace Jackett.Common.Indexers
|
|||
return await Download(uncleanLink, RequestType.GET);
|
||||
}
|
||||
|
||||
protected async Task<byte[]> Download(Uri link, RequestType method, string refererlink = null, Dictionary<string, string>headers = null)
|
||||
protected async Task<byte[]> Download(Uri link, RequestType method, string referer = null, Dictionary<string, string>headers = null)
|
||||
{
|
||||
// return magnet link
|
||||
if (link.Scheme == "magnet")
|
||||
|
@ -392,7 +392,7 @@ namespace Jackett.Common.Indexers
|
|||
.Replace("(", "%28")
|
||||
.Replace(")", "%29")
|
||||
.Replace("'", "%27");
|
||||
var response = await RequestWithCookiesAndRetryAsync(requestLink, null, method, refererlink, null, headers);
|
||||
var response = await RequestWithCookiesAndRetryAsync(requestLink, null, method, referer, null, headers);
|
||||
|
||||
if (response.IsRedirect)
|
||||
{
|
||||
|
|
|
@ -1777,14 +1777,11 @@ namespace Jackett.Common.Indexers
|
|||
var variables = GetBaseTemplateVariables();
|
||||
AddTemplateVariablesFromUri(variables, link, ".DownloadUri");
|
||||
if (Download.Before != null)
|
||||
{
|
||||
var beforeresult = await handleRequest(Download.Before, variables, link.ToString());
|
||||
}
|
||||
if (Download.Method != null)
|
||||
{
|
||||
if (Download.Method == "post")
|
||||
method = RequestType.POST;
|
||||
}
|
||||
await handleRequest(Download.Before, variables, link.ToString());
|
||||
|
||||
if (Download.Method == "post")
|
||||
method = RequestType.POST;
|
||||
|
||||
if (Download.Selector != null)
|
||||
{
|
||||
var selector = applyGoTemplateText(Download.Selector, variables);
|
||||
|
@ -1819,7 +1816,7 @@ namespace Jackett.Common.Indexers
|
|||
}
|
||||
}
|
||||
}
|
||||
return await base.Download(link, method);
|
||||
return await base.Download(link, method, link.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue