New: (FileList) Freeleech Only option

Fixes #1147
pull/1234/head
Qstick 2 years ago
parent fa923e658f
commit 9227efdb65

@ -109,6 +109,11 @@ namespace NzbDrone.Core.Indexers.FileList
var baseUrl = string.Format("{0}/api.php?action={1}&category={2}&username={3}&passkey={4}{5}", Settings.BaseUrl.TrimEnd('/'), searchType, categoriesQuery, Settings.Username.Trim(), Settings.Passkey.Trim(), parameters); var baseUrl = string.Format("{0}/api.php?action={1}&category={2}&username={3}&passkey={4}{5}", Settings.BaseUrl.TrimEnd('/'), searchType, categoriesQuery, Settings.Username.Trim(), Settings.Passkey.Trim(), parameters);
if (Settings.FreeleechOnly)
{
baseUrl += "&freeleech=1";
}
yield return new IndexerRequest(baseUrl, HttpAccept.Json); yield return new IndexerRequest(baseUrl, HttpAccept.Json);
} }
} }

@ -29,6 +29,9 @@ namespace NzbDrone.Core.Indexers.FileList
[FieldDefinition(3, Label = "Passkey", HelpText = "Site Passkey (This is the alphanumeric string in the tracker url shown in your download client)", Privacy = PrivacyLevel.Password, Type = FieldType.Password)] [FieldDefinition(3, Label = "Passkey", HelpText = "Site Passkey (This is the alphanumeric string in the tracker url shown in your download client)", Privacy = PrivacyLevel.Password, Type = FieldType.Password)]
public string Passkey { get; set; } public string Passkey { get; set; }
[FieldDefinition(4, Label = "Freeleech Only", HelpText = "Search Freeleech torrents only", Type = FieldType.Checkbox)]
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));

@ -27,10 +27,10 @@ namespace NzbDrone.Core.Indexers.Settings
[FieldDefinition(2, Label = "Cookie", HelpText = "Site Cookie", Privacy = PrivacyLevel.Password, Type = FieldType.Password)] [FieldDefinition(2, Label = "Cookie", HelpText = "Site Cookie", Privacy = PrivacyLevel.Password, Type = FieldType.Password)]
public string Cookie { get; set; } public string Cookie { get; set; }
[FieldDefinition(3)] [FieldDefinition(10)]
public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings(); public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings();
[FieldDefinition(4)] [FieldDefinition(11)]
public IndexerTorrentBaseSettings TorrentBaseSettings { get; set; } = new IndexerTorrentBaseSettings(); public IndexerTorrentBaseSettings TorrentBaseSettings { get; set; } = new IndexerTorrentBaseSettings();
public virtual NzbDroneValidationResult Validate() public virtual NzbDroneValidationResult Validate()

@ -15,10 +15,10 @@ namespace NzbDrone.Core.Indexers.Settings
[FieldDefinition(1, Label = "Base Url", Type = FieldType.Select, SelectOptionsProviderAction = "getUrls", HelpText = "Select which baseurl Prowlarr will use for requests to the site")] [FieldDefinition(1, Label = "Base Url", Type = FieldType.Select, SelectOptionsProviderAction = "getUrls", HelpText = "Select which baseurl Prowlarr will use for requests to the site")]
public string BaseUrl { get; set; } public string BaseUrl { get; set; }
[FieldDefinition(2)] [FieldDefinition(10)]
public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings(); public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings();
[FieldDefinition(3)] [FieldDefinition(11)]
public IndexerTorrentBaseSettings TorrentBaseSettings { get; set; } = new IndexerTorrentBaseSettings(); public IndexerTorrentBaseSettings TorrentBaseSettings { get; set; } = new IndexerTorrentBaseSettings();
public virtual NzbDroneValidationResult Validate() public virtual NzbDroneValidationResult Validate()

@ -32,10 +32,10 @@ namespace NzbDrone.Core.Indexers.Settings
[FieldDefinition(3, Label = "Password", HelpText = "Site Password", Privacy = PrivacyLevel.Password, Type = FieldType.Password)] [FieldDefinition(3, Label = "Password", HelpText = "Site Password", Privacy = PrivacyLevel.Password, Type = FieldType.Password)]
public string Password { get; set; } public string Password { get; set; }
[FieldDefinition(4)] [FieldDefinition(10)]
public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings(); public IndexerBaseSettings BaseSettings { get; set; } = new IndexerBaseSettings();
[FieldDefinition(5)] [FieldDefinition(11)]
public IndexerTorrentBaseSettings TorrentBaseSettings { get; set; } = new IndexerTorrentBaseSettings(); public IndexerTorrentBaseSettings TorrentBaseSettings { get; set; } = new IndexerTorrentBaseSettings();
public NzbDroneValidationResult Validate() public NzbDroneValidationResult Validate()

Loading…
Cancel
Save