mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Updated
This commit is contained in:
parent
7aa6f0d45f
commit
9a01e395d9
3 changed files with 5 additions and 5 deletions
|
@ -396,12 +396,12 @@ if (!$output) {
|
|||
'min interval' => (int)$announce_interval,
|
||||
'complete' => (int)$seeders,
|
||||
'incomplete' => (int)$leechers,
|
||||
//'downloaded' => int($client_complete)
|
||||
// TODO: 'downloaded' => (int)$client_complete,
|
||||
'warning message' => 'Statistics were updated',
|
||||
'peers' => $peers,
|
||||
];
|
||||
|
||||
CACHE('tr_cache')->set(PEERS_LIST_PREFIX . $topic_id, $output, PEERS_LIST_EXPIRE);
|
||||
$peers_list_cached = CACHE('tr_cache')->set(PEERS_LIST_PREFIX . $topic_id, $output, PEERS_LIST_EXPIRE);
|
||||
}
|
||||
|
||||
// Return data to client
|
||||
|
|
|
@ -71,7 +71,7 @@ function dummy_exit($interval = 1800, $cache_dict = [])
|
|||
if (!empty($cache_dict)) {
|
||||
$output['complete'] = $cache_dict['complete'];
|
||||
$output['incomplete'] = $cache_dict['incomplete'];
|
||||
//$output['downloaded'] = $cache_dict['downloaded'];
|
||||
// TODO: $output['downloaded'] = $cache_dict['downloaded'];
|
||||
$output['warning message'] = 'Next statistics update in: ' . (floor($interval / 60) % 60) . ' minutes';
|
||||
$output['peers'] = $cache_dict['peers'];
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ if (strlen($info_hash) == 32) {
|
|||
} elseif (strlen($info_hash) == 20) {
|
||||
$is_bt_v2 = false;
|
||||
} else {
|
||||
msg_die('Invalid info_hash');
|
||||
msg_die('Invalid info_hash: ' . $info_hash);
|
||||
}
|
||||
|
||||
$info_hash_hex = bin2hex($info_hash);
|
||||
|
@ -70,7 +70,7 @@ $output['files'][$info_hash] = [
|
|||
'incomplete' => (int)$row['leechers'],
|
||||
];
|
||||
|
||||
CACHE('tr_cache')->set(SCRAPE_LIST_PREFIX . $info_hash_hex, $output, SCRAPE_LIST_EXPIRE);
|
||||
$peers_list_cached = CACHE('tr_cache')->set(SCRAPE_LIST_PREFIX . $info_hash_hex, $output, SCRAPE_LIST_EXPIRE);
|
||||
|
||||
echo \SandFox\Bencode\Bencode::encode($output);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue