mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 13:57:11 -04: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 @@ namespace NzbDrone.Core.Indexers.Definitions.Cardigann
|
||||||
requestBuilder.SetHeaders(headers ?? new Dictionary<string, string>());
|
requestBuilder.SetHeaders(headers ?? new Dictionary<string, string>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (searchPath.Followredirect)
|
||||||
|
{
|
||||||
|
requestBuilder.AllowAutoRedirect = true;
|
||||||
|
}
|
||||||
|
|
||||||
var request = requestBuilder
|
var request = requestBuilder
|
||||||
.WithRateLimit(_rateLimit.TotalSeconds)
|
.WithRateLimit(_rateLimit.TotalSeconds)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var cardigannRequest = new CardigannRequest(request, variables, searchPath)
|
yield return new CardigannRequest(request, variables, searchPath);
|
||||||
{
|
|
||||||
HttpRequest =
|
|
||||||
{
|
|
||||||
AllowAutoRedirect = searchPath.Followredirect
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
yield return cardigannRequest;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue