mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
gazellegamesapi: fix NullRef when "Torrents" is not present in the response
This commit is contained in:
@@ -285,7 +285,7 @@ namespace Jackett.Common.Indexers.Definitions
|
|||||||
var groupId = int.Parse(gObj.Key);
|
var groupId = int.Parse(gObj.Key);
|
||||||
var group = gObj.Value as JObject;
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -295,7 +295,9 @@ namespace Jackett.Common.Indexers.Definitions
|
|||||||
.Distinct()
|
.Distinct()
|
||||||
.ToArray();
|
.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;
|
var torrent = tObj.Value as JObject;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user