diff --git a/src/Jackett.Common/Indexers/Definitions/GazelleGamesAPI.cs b/src/Jackett.Common/Indexers/Definitions/GazelleGamesAPI.cs index b0c15baa7..8bb38d43a 100644 --- a/src/Jackett.Common/Indexers/Definitions/GazelleGamesAPI.cs +++ b/src/Jackett.Common/Indexers/Definitions/GazelleGamesAPI.cs @@ -285,7 +285,7 @@ namespace Jackett.Common.Indexers.Definitions var groupId = int.Parse(gObj.Key); var group = gObj.Value as JObject; - if (group["Torrents"].Type == JTokenType.Array && group["Torrents"] is JArray { Count: 0 }) + if (group["Torrents"] is not JObject groupTorrents) { continue; } @@ -295,7 +295,9 @@ namespace Jackett.Common.Indexers.Definitions .Distinct() .ToArray(); - foreach (var tObj in JObject.FromObject(group["Torrents"])) + var torrents = JObject.FromObject(groupTorrents); + + foreach (var tObj in torrents) { var torrent = tObj.Value as JObject;