Readded 0 cat to the end of the Newznab list

Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
Taloth Saldono
2020-11-14 22:33:03 +01:00
committed by nitsua
parent 15e0b8dd4d
commit 5545ae94ac
4 changed files with 194 additions and 13 deletions

View File

@@ -209,7 +209,11 @@ namespace Readarr.Http.ClientSchema
{
return fieldValue =>
{
if (fieldValue.GetType() == typeof(JArray))
if (fieldValue == null)
{
return Enumerable.Empty<int>();
}
else if (fieldValue.GetType() == typeof(JArray))
{
return ((JArray)fieldValue).Select(s => s.Value<int>());
}
@@ -223,7 +227,11 @@ namespace Readarr.Http.ClientSchema
{
return fieldValue =>
{
if (fieldValue.GetType() == typeof(JArray))
if (fieldValue == null)
{
return Enumerable.Empty<string>();
}
else if (fieldValue.GetType() == typeof(JArray))
{
return ((JArray)fieldValue).Select(s => s.Value<string>());
}