mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Scraping improvements (#1046)
This commit is contained in:
parent
c0194aaa54
commit
9ca9c72a08
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue