优化提示信息。echo对隐私信息脱敏

This commit is contained in:
iyuu.cn
2020-02-09 23:19:44 +08:00
parent 6144b8b301
commit e073f165ac
2 changed files with 13 additions and 4 deletions

View File

@ -359,7 +359,7 @@ class AutoReseed
} else {
$errmsg = isset($result->result) ? $result->result : '未知错误,请稍后重试!';
if ($is_url) {
print "种子:".$torrent . PHP_EOL;
print "种子:" . substr($torrent, 0, (strpos($torrent, 'passkey') ? strpos($torrent, 'passkey') : strlen($torrent))) . PHP_EOL;
}
print "-----RPC添加种子任务失败 [{$errmsg}]" . PHP_EOL.PHP_EOL;
}
@ -375,7 +375,7 @@ class AutoReseed
$result = self::$links[$rpcKey]['rpc']->add_metainfo($torrent, $save_path, $extra_options); // 种子元数据添加下载任务
}
if ($is_url) {
print "种子:".$torrent.PHP_EOL;
print "种子:". substr($torrent, 0, (strpos($torrent, 'passkey') ? strpos($torrent, 'passkey') : strlen($torrent))) . PHP_EOL;
}
if ($result === 'Ok.') {
print "********RPC添加下载任务成功 [{$result}]".PHP_EOL.PHP_EOL;
@ -786,9 +786,11 @@ class AutoReseed
}
echo "种子URL已推送给下载器下载器正在下载种子...".PHP_EOL;
// 实际路径与相对路径之间互转
echo '转换前:'.$downloadDir.PHP_EOL;
$downloadDir = self::pathReplace($downloadDir);
echo '转换后:'.$downloadDir.PHP_EOL;
if (is_null($downloadDir)) {
die("全局配置的move数组内type配置错误,请重新配置!!!".PHP_EOL);
die("全局配置的move数组内路径转换参数配置错误,请重新配置!!!".PHP_EOL);
}
$ret = false;
// 把拼接的种子URL推送给下载器