优先检查passkey,排除用户没有的站点

This commit is contained in:
iyuu.cn 2020-08-06 14:36:02 +08:00
parent 463e45ee38
commit 630dc3af92

View File

@ -703,13 +703,7 @@ class AutoReseed
$info_hash = $torrent['info_hash']; $info_hash = $torrent['info_hash'];
$siteName = self::$sites[$sid]['site']; $siteName = self::$sites[$sid]['site'];
// cookie检测 // passkey检测 [优先检查passkey排除用户没有的站点]
if (in_array($siteName, self::$cookieCheck) && empty($configALL[$siteName]['cookie'])) {
echo '-------因当前' .$siteName. '站点未设置cookie已跳过' .PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedSkip']++;
return false;
}
// passkey检测
if (empty($configALL[$siteName]) || empty($configALL[$siteName]['passkey'])) { if (empty($configALL[$siteName]) || empty($configALL[$siteName]['passkey'])) {
//echo '-------因当前' .$siteName. "站点未设置passkey已跳过".PHP_EOL.PHP_EOL; //echo '-------因当前' .$siteName. "站点未设置passkey已跳过".PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedSkip']++; self::$wechatMsg['reseedSkip']++;
@ -717,6 +711,12 @@ class AutoReseed
} else { } else {
echo "clients_".$k."正在辅种... {$siteName}".PHP_EOL; echo "clients_".$k."正在辅种... {$siteName}".PHP_EOL;
} }
// cookie检测
if (in_array($siteName, self::$cookieCheck) && empty($configALL[$siteName]['cookie'])) {
echo '-------因当前' .$siteName. '站点未设置cookie已跳过' .PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedSkip']++;
return false;
}
// 重复做种检测 // 重复做种检测
if (isset($infohash_Dir[$info_hash])) { if (isset($infohash_Dir[$info_hash])) {
echo '-------与客户端现有种子重复:'.$_url.PHP_EOL.PHP_EOL; echo '-------与客户端现有种子重复:'.$_url.PHP_EOL.PHP_EOL;