Fixed: Use indexer errors from response if Content-Type is XML before processing response

This commit is contained in:
Bogdan 2023-05-18 16:02:14 +03:00 committed by Mark McDowall
parent 4fecd6ed89
commit 9bdc618366
2 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,8 @@ namespace NzbDrone.Core.Indexers.Newznab
protected override bool PreProcess(IndexerResponse indexerResponse)
{
if (indexerResponse.HttpResponse.HasHttpError)
if (indexerResponse.HttpResponse.HasHttpError &&
(indexerResponse.HttpResponse.Headers.ContentType == null || !indexerResponse.HttpResponse.Headers.ContentType.Contains("xml")))
{
base.PreProcess(indexerResponse);
}

View File

@ -19,7 +19,8 @@ namespace NzbDrone.Core.Indexers.Torznab
protected override bool PreProcess(IndexerResponse indexerResponse)
{
if (indexerResponse.HttpResponse.HasHttpError)
if (indexerResponse.HttpResponse.HasHttpError &&
(indexerResponse.HttpResponse.Headers.ContentType == null || !indexerResponse.HttpResponse.Headers.ContentType.Contains("xml")))
{
base.PreProcess(indexerResponse);
}