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

(cherry picked from commit 9bdc6183663a3510e53433a30ad701065e7ee9d9)
pull/1676/head
Bogdan 2 years ago
parent 2b0f4e18e7
commit 6a7fe30171

@ -54,7 +54,8 @@ namespace NzbDrone.Core.Indexers.Headphones
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);
}

@ -58,7 +58,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);
}

@ -28,7 +28,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);
}

Loading…
Cancel
Save