hr only for leecher

This commit is contained in:
lgb
2023-09-21 12:32:51 +08:00
parent ab517bf412
commit 762cdb2dae
+1 -1
View File
@@ -607,7 +607,7 @@ else
}
//handle hr
if ($az['class'] < \App\Models\HitAndRun::MINIMUM_IGNORE_USER_CLASS && !$isDonor && isset($torrent['mode'])) {
if (($left > 0 || $event == "completed") && $az['class'] < \App\Models\HitAndRun::MINIMUM_IGNORE_USER_CLASS && !$isDonor && isset($torrent['mode'])) {
$hrMode = \App\Models\HitAndRun::getConfig('mode', $torrent['mode']);
$hrLog = sprintf("[HR_LOG] user: %d, torrent: %d, hrMode: %s", $userid, $torrentid, $hrMode);
if ($hrMode == \App\Models\HitAndRun::MODE_GLOBAL || ($hrMode == \App\Models\HitAndRun::MODE_MANUAL && $torrent['hr'] == \App\Models\Torrent::HR_YES)) {