mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-21 04:10:52 +02:00
Fixed: (BeyondHD) Add search by freeleech only
This commit is contained in:
parent
6dd354bf1a
commit
ac487f9b40
1 changed files with 14 additions and 0 deletions
|
|
@ -85,6 +85,12 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string term, int[] categori
|
|||
{ "rsskey", _settings.RssKey }
|
||||
};
|
||||
|
||||
if (_settings.FreeleechOnly)
|
||||
{
|
||||
body.Add("freeleech", 1);
|
||||
body.Add("limited", 1);
|
||||
}
|
||||
|
||||
if (imdbId.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
body.Add("imdb_id", imdbId);
|
||||
|
|
@ -263,12 +269,20 @@ public class BeyondHDSettings : NoAuthTorrentBaseSettings
|
|||
{
|
||||
private static readonly BeyondHDSettingsValidator Validator = new ();
|
||||
|
||||
public BeyondHDSettings()
|
||||
{
|
||||
FreeleechOnly = false;
|
||||
}
|
||||
|
||||
[FieldDefinition(2, Label = "API Key", HelpText = "API Key from the Site (Found in My Security => API Key)", Privacy = PrivacyLevel.ApiKey)]
|
||||
public string ApiKey { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "RSS Key", HelpText = "RSS Key from the Site (Found in My Security => RSS Key)", Privacy = PrivacyLevel.ApiKey)]
|
||||
public string RssKey { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "Freeleech Only", Type = FieldType.Checkbox, HelpText = "Search freeleech only")]
|
||||
public bool FreeleechOnly { get; set; }
|
||||
|
||||
public override NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
|
|
|
|||
Loading…
Reference in a new issue