mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-29 16:20:52 +02:00
Fixed: (Cardigann) Simplify creating CardigannRequest
This commit is contained in:
parent
122883053a
commit
4eb5a2d613
1 changed files with 6 additions and 9 deletions
|
|
@ -1165,19 +1165,16 @@ private IEnumerable<IndexerRequest> GetRequest(Dictionary<string, object> variab
|
|||
requestBuilder.SetHeaders(headers ?? new Dictionary<string, string>());
|
||||
}
|
||||
|
||||
if (searchPath.Followredirect)
|
||||
{
|
||||
requestBuilder.AllowAutoRedirect = true;
|
||||
}
|
||||
|
||||
var request = requestBuilder
|
||||
.WithRateLimit(_rateLimit.TotalSeconds)
|
||||
.Build();
|
||||
|
||||
var cardigannRequest = new CardigannRequest(request, variables, searchPath)
|
||||
{
|
||||
HttpRequest =
|
||||
{
|
||||
AllowAutoRedirect = searchPath.Followredirect
|
||||
}
|
||||
};
|
||||
|
||||
yield return cardigannRequest;
|
||||
yield return new CardigannRequest(request, variables, searchPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue