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);
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 @@ namespace NzbDrone.Core.Indexers
// 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…
Cancel
Save