1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-02-26 15:52:42 +00:00

Log response content from Kodi when checking for errors

This commit is contained in:
Qstick 2018-02-22 21:02:21 -05:00
parent 97a0daa1aa
commit 346647523b

View file

@ -122,13 +122,13 @@ private IRestClient BuildClient(XbmcSettings settings)
private void CheckForError(IRestResponse response)
{
_logger.Debug("Looking for error in response: {0}", response);
if (string.IsNullOrWhiteSpace(response.Content))
{
throw new XbmcJsonException("Invalid response from XBMC, the response is not valid JSON");
}
_logger.Trace("Looking for error in response, {0}", response.Content);
if (response.Content.StartsWith("{\"error\""))
{
var error = Json.Deserialize<ErrorResult>(response.Content);