mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-27 00:02:25 +00:00
Fix: Decode Gazelle Response before parsing releases
This commit is contained in:
parent
0f17569908
commit
71cc80aef9
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
|
@ -40,7 +40,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
||||||
throw new IndexerException(indexerResponse, $"Unexpected response header {indexerResponse.HttpResponse.Headers.ContentType} from API request, expected {HttpAccept.Json.Value}");
|
throw new IndexerException(indexerResponse, $"Unexpected response header {indexerResponse.HttpResponse.Headers.ContentType} from API request, expected {HttpAccept.Json.Value}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var jsonResponse = JsonConvert.DeserializeObject<GazelleResponse>(indexerResponse.Content);
|
var jsonResponse = JsonConvert.DeserializeObject<GazelleResponse>(WebUtility.HtmlDecode(indexerResponse.Content));
|
||||||
if (jsonResponse.Status != "success" ||
|
if (jsonResponse.Status != "success" ||
|
||||||
jsonResponse.Status.IsNullOrWhiteSpace() ||
|
jsonResponse.Status.IsNullOrWhiteSpace() ||
|
||||||
jsonResponse.Response == null)
|
jsonResponse.Response == null)
|
||||||
|
|
Loading…
Reference in a new issue