From 2d36adf8652410a26a5f92756c10c79e749a8a9c Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 29 May 2023 17:35:37 +0300 Subject: [PATCH] Fixed: (Cardigann): Use `MissingAttributeEqualsNoResults` for `Search.Rows.Attribute` --- .../Definitions/Cardigann/CardigannParser.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs index 9af17a161..2513898b6 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannParser.cs @@ -116,7 +116,18 @@ namespace NzbDrone.Core.Indexers.Definitions.Cardigann foreach (var row in rowsArray) { - var selObj = search.Rows.Attribute != null ? row.SelectToken(search.Rows.Attribute).Value() : row; + var selObj = row; + + if (search.Rows.Attribute != null) + { + selObj = row.SelectToken(search.Rows.Attribute)?.Value(); + + if (selObj == null && search.Rows.MissingAttributeEqualsNoResults) + { + continue; + } + } + var mulRows = search.Rows.Multiple ? selObj.Values() : new List { selObj.Value() }; foreach (var mulRow in mulRows)