New: (Cardigann) Add AllowEmptyInputs

Co-Authored-By: Bogdan <mynameisbogdan@users.noreply.github.com>
pull/1479/head
Qstick 2 years ago
parent b42bf2cf20
commit ec8025c3dc

@ -144,6 +144,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
{ {
public int PageSize { get; set; } public int PageSize { get; set; }
public int FirstPageNumber { get; set; } public int FirstPageNumber { get; set; }
public bool AllowEmptyInputs { get; set; }
public string Path { get; set; } public string Path { get; set; }
public List<SearchPathBlock> Paths { get; set; } public List<SearchPathBlock> Paths { get; set; }
public Dictionary<string, List<string>> Headers { get; set; } public Dictionary<string, List<string>> Headers { get; set; }

@ -1117,7 +1117,12 @@ namespace NzbDrone.Core.Indexers.Cardigann
} }
else else
{ {
queryCollection.Add(input.Key, ApplyGoTemplateText(input.Value, variables)); var inputValue = ApplyGoTemplateText(input.Value, variables);
if (!string.IsNullOrWhiteSpace(inputValue) || search.AllowEmptyInputs)
{
queryCollection.Add(input.Key, inputValue);
}
} }
} }
} }

Loading…
Cancel
Save