cardigann: catch errors when `search.rows.count` is not found in page

This commit is contained in:
Bogdan 2023-04-10 07:44:40 +03:00
parent d69a846299
commit 9506193e1e
1 changed files with 11 additions and 4 deletions

View File

@ -1450,6 +1450,8 @@ namespace Jackett.Common.Indexers
throw new Exception("Error Parsing Json Response");
if (Search.Rows.Count != null)
{
try
{
var countVal = handleJsonSelector(Search.Rows.Count, parsedJson, variables);
@ -1458,6 +1460,11 @@ namespace Jackett.Common.Indexers
continue;
}
}
catch (Exception ex)
{
logger.Trace(ex, "Failed to parse JSON rows count.");
}
}
var rowsArray = JsonParseRowsSelector(parsedJson, Search.Rows.Selector);