diff --git a/bt/scrape.php b/bt/scrape.php index 61230de32..7efa994cf 100644 --- a/bt/scrape.php +++ b/bt/scrape.php @@ -72,13 +72,13 @@ if (!empty($info_hash_count)) { if (!empty($rowset)) { foreach ($rowset as $scrapes) { - $info_hash_scrape = !empty($scrapes['info_hash_v2']) ? $scrapes['info_hash_v2'] : $scrapes['info_hash']; + $info_hash_scrape = in_array(urlencode($scrapes['info_hash']), $info_hash_array[1]) ? $scrapes['info_hash'] : substr($scrapes['info_hash_v2'], 0, 20); $torrents['files'][$info_hash_scrape] = [ 'complete' => (int)$scrapes['seeders'], 'downloaded' => (int)$scrapes['complete_count'], 'incomplete' => (int)$scrapes['leechers'] ]; - CACHE('tr_cache')->set(SCRAPE_LIST_PREFIX . bin2hex(substr($info_hash_scrape, 0, 20)), array_slice($torrents['files'], -1, null, true), SCRAPE_LIST_EXPIRE); + CACHE('tr_cache')->set(SCRAPE_LIST_PREFIX . bin2hex($info_hash_scrape), array_slice($torrents['files'], -1, null, true), SCRAPE_LIST_EXPIRE); } } } diff --git a/library/config.php b/library/config.php index 59c88c8b3..7b5f9dce5 100644 --- a/library/config.php +++ b/library/config.php @@ -95,8 +95,8 @@ $bb_cfg['gzip_compress'] = false; // compress output // Tracker $bb_cfg['announce_interval'] = 1800; // Announce interval (default: 1800) -$bb_cfg['scrape_interval'] = 100; // Scrape interval (default: 100) -$bb_cfg['max_scrapes'] = 20; // Allowed number of info-hashes for simultaneous scraping (default: 20) +$bb_cfg['scrape_interval'] = 80; // Scrape interval (default: 100) +$bb_cfg['max_scrapes'] = 150; // Allowed number of info-hashes for simultaneous scraping (default: 150) $bb_cfg['passkey_key'] = 'uk'; // Passkey key name in GET request $bb_cfg['ignore_reported_ip'] = false; // Ignore IP reported by client $bb_cfg['verify_reported_ip'] = true; // Verify IP reported by client against $_SERVER['HTTP_X_FORWARDED_FOR']