mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-19 19:30:47 +02:00
New: (Cardigann) Add AllowEmptyInputs
Co-Authored-By: Bogdan <mynameisbogdan@users.noreply.github.com>
This commit is contained in:
parent
b42bf2cf20
commit
ec8025c3dc
2 changed files with 7 additions and 1 deletions
|
|
@ -144,6 +144,7 @@ public class SearchBlock
|
|||
{
|
||||
public int PageSize { get; set; }
|
||||
public int FirstPageNumber { get; set; }
|
||||
public bool AllowEmptyInputs { get; set; }
|
||||
public string Path { get; set; }
|
||||
public List<SearchPathBlock> Paths { get; set; }
|
||||
public Dictionary<string, List<string>> Headers { get; set; }
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,12 @@ private IEnumerable<IndexerRequest> GetRequest(Dictionary<string, object> variab
|
|||
}
|
||||
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…
Reference in a new issue