mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-05-23 10:05:23 +00:00
优化提高Windows平台转移做种客户端的兼容性
This commit is contained in:
parent
efa11d280d
commit
125394ee0b
@ -292,6 +292,7 @@ class AutoReseed
|
|||||||
self::$curl->setOpt(CURLOPT_CONNECTTIMEOUT, $connecttimeout);
|
self::$curl->setOpt(CURLOPT_CONNECTTIMEOUT, $connecttimeout);
|
||||||
self::$curl->setOpt(CURLOPT_TIMEOUT, $timeout);
|
self::$curl->setOpt(CURLOPT_TIMEOUT, $timeout);
|
||||||
}
|
}
|
||||||
|
// P($infohash_Dir); // 调试:打印目录对应表
|
||||||
echo "正在向服务器提交 clients_".$k." 种子哈希……".PHP_EOL;
|
echo "正在向服务器提交 clients_".$k." 种子哈希……".PHP_EOL;
|
||||||
$res = self::$curl->post(self::$apiUrl . self::$endpoints['infohash'], $hashArray);
|
$res = self::$curl->post(self::$apiUrl . self::$endpoints['infohash'], $hashArray);
|
||||||
$res = json_decode($res->response, true);
|
$res = json_decode($res->response, true);
|
||||||
@ -645,6 +646,7 @@ class AutoReseed
|
|||||||
global $configALL;
|
global $configALL;
|
||||||
$type = $configALL['default']['move']['type'];
|
$type = $configALL['default']['move']['type'];
|
||||||
$pathArray = $configALL['default']['move']['path'];
|
$pathArray = $configALL['default']['move']['path'];
|
||||||
|
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1: // 减
|
case 1: // 减
|
||||||
foreach ($pathArray as $key => $val) {
|
foreach ($pathArray as $key => $val) {
|
||||||
|
@ -448,3 +448,12 @@ function ShowTableSites($dir = 'Protocols', $filter = array())
|
|||||||
$table->setRows($data);
|
$table->setRows($data);
|
||||||
echo($table->render());
|
echo($table->render());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否win平台
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function isWin()
|
||||||
|
{
|
||||||
|
return (DIRECTORY_SEPARATOR == '\\') ? true : false;
|
||||||
|
}
|
@ -134,7 +134,6 @@ return array(
|
|||||||
// 如果需要自动辅种,必须配置
|
// 如果需要自动辅种,必须配置
|
||||||
'passkey' => '',
|
'passkey' => '',
|
||||||
'id' => 0, // 用户ID
|
'id' => 0, // 用户ID
|
||||||
'is_vip' => 0, // 是否具有VIP或特殊权限?0 普通,1 VIP
|
|
||||||
'workingMode' => 0,
|
'workingMode' => 0,
|
||||||
'watch' => '/root/downloads',
|
'watch' => '/root/downloads',
|
||||||
'filter' => array(
|
'filter' => array(
|
||||||
|
1
init.php
1
init.php
@ -50,6 +50,7 @@ if (is_file(ROOT_PATH . "/config/sites.json")) {
|
|||||||
echo microtime(true).' 正在加载composer包管理器...'.PHP_EOL;
|
echo microtime(true).' 正在加载composer包管理器...'.PHP_EOL;
|
||||||
require_once ROOT_PATH . '/vendor/autoload.php';
|
require_once ROOT_PATH . '/vendor/autoload.php';
|
||||||
echo microtime(true).' composer依赖载入完成!'.PHP_EOL;
|
echo microtime(true).' composer依赖载入完成!'.PHP_EOL;
|
||||||
|
echo microtime(true).' 当前脚本运行环境:'.PHP_OS.PHP_EOL;
|
||||||
global $argv;
|
global $argv;
|
||||||
$start_file = str_replace("\\", "/", trim($argv[0]));
|
$start_file = str_replace("\\", "/", trim($argv[0]));
|
||||||
if (substr($start_file, -8)==="init.php") {
|
if (substr($start_file, -8)==="init.php") {
|
||||||
|
@ -47,12 +47,11 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
|||||||
|
|
||||||
## 使用方法
|
## 使用方法
|
||||||
详见Wiki:
|
详见Wiki:
|
||||||
https://gitee.com/ledc/IYUUAutoReseed/wikis
|
|
||||||
|
|
||||||
https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki
|
https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki
|
||||||
|
|
||||||
## 接口开发文档
|
## 接口开发文档
|
||||||
http://api.iyuu.cn/docs.php?type=expand
|
http://api.iyuu.cn/docs.php
|
||||||
|
|
||||||
|
|
||||||
## 需求提交/错误反馈
|
## 需求提交/错误反馈
|
||||||
|
Loading…
x
Reference in New Issue
Block a user