Andraste: Add global freeleech check

This commit is contained in:
kaso17 2016-12-24 13:12:36 +01:00
parent 357be7dda9
commit 15598e3d66
1 changed files with 4 additions and 1 deletions

View File

@ -129,6 +129,7 @@ namespace Jackett.Indexers
try
{
CQ dom = results;
var globalFreeleech = dom.Find("div > img[alt=\"Only Upload\"][title^=\"ONLY UPLOAD \"]").Any();
var rows = dom["table.tableinborder > tbody > tr:has(td.tableb)"];
foreach (var row in rows)
@ -186,7 +187,9 @@ namespace Jackett.Indexers
var grabs = qRow.Find("a[href*=\"&tosnatchers=1\"] ~ font ~ b").Text();
release.Grabs = ParseUtil.CoerceInt(grabs);
if (qRow.Find("img[alt=\"OU\"]").Length >= 1)
if (globalFreeleech)
release.DownloadVolumeFactor = 0;
else if (qRow.Find("img[alt=\"OU\"]").Length >= 1)
release.DownloadVolumeFactor = 0;
else
release.DownloadVolumeFactor = 1;