mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
announce add hr log
This commit is contained in:
@@ -651,11 +651,14 @@ elseif(isset($self))
|
|||||||
//not set yet
|
//not set yet
|
||||||
$includeRate = 1;
|
$includeRate = 1;
|
||||||
}
|
}
|
||||||
|
$hrLog = sprintf("user: %d, torrent: %d, includeRate: %s", $userid, $torrentid, $includeRate);
|
||||||
$includeHr = false;
|
$includeHr = false;
|
||||||
if ($includeRate >= 1 && $event == "completed") {
|
if ($includeRate >= 1 && $event == "completed") {
|
||||||
$includeHr = true;
|
$includeHr = true;
|
||||||
|
$hrLog .= "includeRate >= 1 and event = completed, includeHr = true";
|
||||||
} elseif ($includeRate < 1 && $includeRate >= 0 && $seeder == "no" && ($left <= $torrent['size'] * (1 - $includeRate))) {
|
} elseif ($includeRate < 1 && $includeRate >= 0 && $seeder == "no" && ($left <= $torrent['size'] * (1 - $includeRate))) {
|
||||||
$includeHr = true;
|
$includeHr = true;
|
||||||
|
$hrLog .= "seeder = no and left lte enough, includeHr = true";
|
||||||
}
|
}
|
||||||
if ($includeHr) {
|
if ($includeHr) {
|
||||||
$hrMode = \App\Models\HitAndRun::getConfig('mode', $torrent['mode']);
|
$hrMode = \App\Models\HitAndRun::getConfig('mode', $torrent['mode']);
|
||||||
|
|||||||
Reference in New Issue
Block a user