Fixed: (AvistaZ) Don't log http errors like 404 for imdb/tmdb/tvdb searches

pull/1588/head
Bogdan 2 years ago
parent 7820a83a5d
commit bf7f769f13

@ -85,6 +85,11 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
var request = new IndexerRequest(searchUrl, HttpAccept.Html); var request = new IndexerRequest(searchUrl, HttpAccept.Html);
request.HttpRequest.Headers.Add("Authorization", $"Bearer {Settings.Token}"); 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; yield return request;
} }

@ -509,8 +509,11 @@ namespace NzbDrone.Core.Indexers
// Throw common http errors here before we try to parse // Throw common http errors here before we try to parse
if (response.HasHttpError) if (response.HasHttpError)
{
if (response.Request.LogHttpError)
{ {
_logger.Warn("HTTP Error - {0}", response); _logger.Warn("HTTP Error - {0}", response);
}
if (response.StatusCode == HttpStatusCode.TooManyRequests) if (response.StatusCode == HttpStatusCode.TooManyRequests)
{ {

Loading…
Cancel
Save