mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
revert: Added IndexNow
protocol support 🤖
This commit is contained in:
parent
6440162187
commit
1b288a96e4
7 changed files with 3 additions and 155 deletions
|
@ -64,14 +64,5 @@ if (empty($bb_cfg['tp_instance_hash']) || ($bb_cfg['tp_instance_hash'] !== hash(
|
|||
bb_update_config(['tp_instance_hash' => hash('xxh128', FULL_URL)]);
|
||||
}
|
||||
|
||||
// Generate IndexNow key
|
||||
if ($bb_cfg['indexnow_settings']['enabled'] && !is_file(BB_ROOT . $bb_cfg['indexnow_key'] . \TorrentPier\IndexNow::$keyFileExtension)) {
|
||||
$randomIndexNowKey = empty($bb_cfg['indexnow_key']) ? make_rand_str(rand(64, 128)) : $bb_cfg['indexnow_key'];
|
||||
if ($bb_cfg['indexnow_key'] !== $randomIndexNowKey) {
|
||||
bb_update_config(['indexnow_key' => $randomIndexNowKey]);
|
||||
}
|
||||
file_write($randomIndexNowKey, (BB_ROOT . $randomIndexNowKey . \TorrentPier\IndexNow::$keyFileExtension));
|
||||
}
|
||||
|
||||
// Check for updates
|
||||
$datastore->update('check_updates');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue