Fixed: (GazelleGames) Serialization error on empty response

Fixes #1137
This commit is contained in:
Qstick
2022-09-29 20:14:18 -05:00
parent 0a111e7572
commit 2e85a21576
3 changed files with 32 additions and 2 deletions
@@ -341,7 +341,18 @@ namespace NzbDrone.Core.Indexers.Definitions
return torrentInfos;
}
foreach (var result in jsonResponse.Resource.Response)
Dictionary<string, GazelleGamesGroup> response;
try
{
response = ((JObject)jsonResponse.Resource.Response).ToObject<Dictionary<string, GazelleGamesGroup>>();
}
catch
{
return torrentInfos;
}
foreach (var result in response)
{
Dictionary<string, GazelleGamesTorrent> torrents;
@@ -455,7 +466,7 @@ namespace NzbDrone.Core.Indexers.Definitions
public class GazelleGamesResponse
{
public string Status { get; set; }
public Dictionary<string, GazelleGamesGroup> Response { get; set; }
public object Response { get; set; }
}
public class GazelleGamesGroup