mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-19 22:21:52 +01:00
parent
33de7ca7ab
commit
68df439498
2 changed files with 9 additions and 0 deletions
|
|
@ -34,6 +34,11 @@ protected virtual List<KeyValuePair<string, string>> GetBasicSearchParameters(in
|
|||
{ "type", categoryMapping.Any() ? categoryMapping.First() : "0" }
|
||||
};
|
||||
|
||||
if (Settings.FreeleechOnly)
|
||||
{
|
||||
qc.Add("discount[]", "1");
|
||||
}
|
||||
|
||||
// resolution filter to improve the search
|
||||
if (!categories.Contains(NewznabStandardCategory.Movies.Id) && !categories.Contains(NewznabStandardCategory.TV.Id) &&
|
||||
!categories.Contains(NewznabStandardCategory.Audio.Id))
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ public class AvistazSettings : NoAuthTorrentBaseSettings
|
|||
public AvistazSettings()
|
||||
{
|
||||
Token = "";
|
||||
FreeleechOnly = false;
|
||||
}
|
||||
|
||||
public string Token { get; set; }
|
||||
|
|
@ -35,6 +36,9 @@ public AvistazSettings()
|
|||
[FieldDefinition(4, Label = "PID", HelpText = "PID from My Account or My Profile page")]
|
||||
public string Pid { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Freeleech Only", 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