mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 05:47:22 -04:00
Fixed: (Cardigann) Catch errors when search.rows.count
is not present
This commit is contained in:
parent
31c05be9de
commit
6b2b953686
1 changed files with 11 additions and 4 deletions
|
@ -81,11 +81,18 @@ namespace NzbDrone.Core.Indexers.Cardigann
|
|||
|
||||
if (search.Rows.Count != null)
|
||||
{
|
||||
var countVal = HandleJsonSelector(search.Rows.Count, parsedJson, variables);
|
||||
|
||||
if (int.TryParse(countVal, out var count) && count < 1)
|
||||
try
|
||||
{
|
||||
return releases;
|
||||
var countVal = HandleJsonSelector(search.Rows.Count, parsedJson, variables);
|
||||
|
||||
if (int.TryParse(countVal, out var count) && count < 1)
|
||||
{
|
||||
return releases;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Trace(ex, "Failed to parse JSON rows count.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue