mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-30 15:38:38 +02:00
cardigann: add Boolean usebeforeresponse to downloadblock selectors
this option defaults to false, but if set to true prevents the downloadblock from fetching the details page when processing the selectors for the download. Instead the response from the beforeblock is used to process the selectors. #8600
This commit is contained in:
@@ -1859,7 +1859,8 @@ namespace Jackett.Common.Indexers
|
||||
try
|
||||
{
|
||||
|
||||
response = await HandleRedirectableRequestAsync(link.ToString(), headers);
|
||||
if (!selector.Usebeforeresponse || Download.Before == null || response == null)
|
||||
response = await HandleRedirectableRequestAsync(link.ToString(), headers);
|
||||
var href = MatchSelector(response, selector, variables, debugMatch: true);
|
||||
if (href == null)
|
||||
continue;
|
||||
|
@@ -190,6 +190,7 @@ namespace Jackett.Common.Models
|
||||
{
|
||||
public string Selector { get; set; }
|
||||
public string Attribute { get; set; }
|
||||
public bool Usebeforeresponse { get; set; } = false;
|
||||
public List<filterBlock> Filters { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user