revert peer count

This commit is contained in:
xiaomlove
2022-04-22 01:32:17 +08:00
parent 686ec2754c
commit b9190d9f6e
7 changed files with 18 additions and 30 deletions
+2 -2
View File
@@ -512,8 +512,8 @@ else
}
if (isset($event) && !empty($event)) {
$updateset[] = 'seeders = ' . count_peer("torrent = $torrentid and to_go = 0");
$updateset[] = 'leechers = ' . count_peer("torrent = $torrentid and to_go > 0");
$updateset[] = 'seeders = ' . get_row_count("peers", "where torrent = $torrentid and to_go = 0");
$updateset[] = 'leechers = ' . get_row_count("peers", "where torrent = $torrentid and to_go > 0");
}
if (count($updateset)) // Update only when there is change in peer counts