mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-18 19:00:47 +02:00
Fixed: (AvistaZ) Don't log http errors like 404 for imdb/tmdb/tvdb searches
This commit is contained in:
parent
7820a83a5d
commit
bf7f769f13
2 changed files with 9 additions and 1 deletions
|
|
@ -85,6 +85,11 @@ private IEnumerable<IndexerRequest> GetRequest(List<KeyValuePair<string, string>
|
|||
var request = new IndexerRequest(searchUrl, HttpAccept.Html);
|
||||
request.HttpRequest.Headers.Add("Authorization", $"Bearer {Settings.Token}");
|
||||
|
||||
if (searchParameters.Any(p => p.Key is "imdb" or "tmdb" or "tvdb"))
|
||||
{
|
||||
request.HttpRequest.LogHttpError = false;
|
||||
}
|
||||
|
||||
yield return request;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -510,7 +510,10 @@ protected virtual async Task<IndexerResponse> FetchIndexerResponse(IndexerReques
|
|||
// Throw common http errors here before we try to parse
|
||||
if (response.HasHttpError)
|
||||
{
|
||||
_logger.Warn("HTTP Error - {0}", response);
|
||||
if (response.Request.LogHttpError)
|
||||
{
|
||||
_logger.Warn("HTTP Error - {0}", response);
|
||||
}
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.TooManyRequests)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue