mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-02 00:34:37 +02:00
Fixed: (BeyondHD) Add search by freeleech only
This commit is contained in:
@@ -85,6 +85,12 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
{ "rsskey", _settings.RssKey }
|
{ "rsskey", _settings.RssKey }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (_settings.FreeleechOnly)
|
||||||
|
{
|
||||||
|
body.Add("freeleech", 1);
|
||||||
|
body.Add("limited", 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (imdbId.IsNotNullOrWhiteSpace())
|
if (imdbId.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
body.Add("imdb_id", imdbId);
|
body.Add("imdb_id", imdbId);
|
||||||
@@ -263,12 +269,20 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
{
|
{
|
||||||
private static readonly BeyondHDSettingsValidator Validator = new ();
|
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)]
|
[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; }
|
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)]
|
[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; }
|
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()
|
public override NzbDroneValidationResult Validate()
|
||||||
{
|
{
|
||||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||||
|
Reference in New Issue
Block a user