mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-01 07:55:22 +02:00
Fixed: (Cardigann) Simplify creating CardigannRequest
This commit is contained in:
@@ -1165,19 +1165,16 @@ namespace NzbDrone.Core.Indexers.Definitions.Cardigann
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user