mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-02 00:34:37 +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>());
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user