mirror of
https://github.com/Jackett/Jackett
synced 2025-01-04 22:41:49 +00:00
gazellegamesapi: fix NullRef when "Torrents" is not present in the response
This commit is contained in:
parent
668091af05
commit
85b6ee8b69
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue