mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-16 01:40:47 +02:00
Fixed: (Toloka) Add FreeleechOnly setting
This commit is contained in:
parent
bceebc34c1
commit
534ca73bf8
1 changed files with 22 additions and 1 deletions
|
|
@ -323,6 +323,11 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string term, int[] categori
|
|||
{ "nm", term.IsNotNullOrWhiteSpace() ? term.Replace("-", " ") : "" }
|
||||
};
|
||||
|
||||
if (_settings.FreeleechOnly)
|
||||
{
|
||||
parameters.Add("sds", "1");
|
||||
}
|
||||
|
||||
var queryCats = _capabilities.Categories.MapTorznabCapsToTrackers(categories);
|
||||
if (queryCats.Any())
|
||||
{
|
||||
|
|
@ -408,6 +413,19 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
MinimumSeedTime = 0
|
||||
};
|
||||
|
||||
if (row.QuerySelector("img[src=\"images/gold.gif\"]") != null)
|
||||
{
|
||||
release.DownloadVolumeFactor = 0;
|
||||
}
|
||||
else if (row.QuerySelector("img[src=\"images/silver.gif\"]") != null)
|
||||
{
|
||||
release.DownloadVolumeFactor = 0.5;
|
||||
}
|
||||
else if (row.QuerySelector("img[src=\"images/bronze.gif\"]") != null)
|
||||
{
|
||||
release.DownloadVolumeFactor = 0.75;
|
||||
}
|
||||
|
||||
releaseInfos.Add(release);
|
||||
}
|
||||
|
||||
|
|
@ -540,7 +558,10 @@ public TolokaSettings()
|
|||
StripCyrillicLetters = true;
|
||||
}
|
||||
|
||||
[FieldDefinition(4, Label = "Strip Cyrillic Letters", Type = FieldType.Checkbox)]
|
||||
[FieldDefinition(4, Label = "Freeleech Only", HelpText = "Search Freeleech torrents only", Type = FieldType.Checkbox)]
|
||||
public bool FreeleechOnly { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "Strip Cyrillic Letters", Type = FieldType.Checkbox)]
|
||||
public bool StripCyrillicLetters { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue