diff --git a/bt/announce.php b/bt/announce.php index 29bf478a6..6c69d547f 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -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 diff --git a/bt/includes/init_tr.php b/bt/includes/init_tr.php index b80546422..025a92c80 100644 --- a/bt/includes/init_tr.php +++ b/bt/includes/init_tr.php @@ -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']; } diff --git a/bt/scrape.php b/bt/scrape.php index 1a86af129..bad6a49b4 100644 --- a/bt/scrape.php +++ b/bt/scrape.php @@ -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);