mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-13 16:30:48 +02:00
New: (BeyondHD) Add limited, refund and rewind search options
This commit is contained in:
parent
53adfb750c
commit
d42649c4df
1 changed files with 26 additions and 0 deletions
|
|
@ -88,9 +88,23 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string term, int[] categori
|
|||
if (_settings.FreeleechOnly)
|
||||
{
|
||||
body.Add("freeleech", 1);
|
||||
}
|
||||
|
||||
if (_settings.LimitedOnly)
|
||||
{
|
||||
body.Add("limited", 1);
|
||||
}
|
||||
|
||||
if (_settings.RefundOnly)
|
||||
{
|
||||
body.Add("refund", 1);
|
||||
}
|
||||
|
||||
if (_settings.RewindOnly)
|
||||
{
|
||||
body.Add("rewind", 1);
|
||||
}
|
||||
|
||||
if (imdbId.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
body.Add("imdb_id", imdbId);
|
||||
|
|
@ -272,6 +286,9 @@ public class BeyondHDSettings : NoAuthTorrentBaseSettings
|
|||
public BeyondHDSettings()
|
||||
{
|
||||
FreeleechOnly = false;
|
||||
LimitedOnly = false;
|
||||
RefundOnly = false;
|
||||
RewindOnly = false;
|
||||
}
|
||||
|
||||
[FieldDefinition(2, Label = "API Key", HelpText = "API Key from the Site (Found in My Security => API Key)", Privacy = PrivacyLevel.ApiKey)]
|
||||
|
|
@ -283,6 +300,15 @@ public BeyondHDSettings()
|
|||
[FieldDefinition(4, Label = "Freeleech Only", Type = FieldType.Checkbox, HelpText = "Search freeleech only")]
|
||||
public bool FreeleechOnly { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Limited Only", Type = FieldType.Checkbox, HelpText = "Search freeleech only (Limited UL)")]
|
||||
public bool LimitedOnly { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Refund Only", Type = FieldType.Checkbox, HelpText = "Search refund only")]
|
||||
public bool RefundOnly { get; set; }
|
||||
|
||||
[FieldDefinition(7, Label = "Rewind Only", Type = FieldType.Checkbox, HelpText = "Search rewind only")]
|
||||
public bool RewindOnly { get; set; }
|
||||
|
||||
public override NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
|
|
|
|||
Loading…
Reference in a new issue