mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-04-26 20:33:25 +00:00
合并代码,优化hash缓存日志信息。
This commit is contained in:
parent
9615f177d0
commit
f260065fb9
@ -20,17 +20,17 @@ class AutoReseed
|
||||
* 版本号
|
||||
* @var string
|
||||
*/
|
||||
const VER = '20191224.1010';
|
||||
const VER = '0.2.0';
|
||||
/**
|
||||
* RPC连接池
|
||||
* @var array
|
||||
*/
|
||||
public static $links = array();
|
||||
public static $links = [];
|
||||
/**
|
||||
* 客户端配置
|
||||
* @var array
|
||||
*/
|
||||
public static $clients = array();
|
||||
public static $clients = [];
|
||||
/**
|
||||
* 不辅种的站点 'ourbits','hdchina'
|
||||
* @var array
|
||||
@ -206,7 +206,6 @@ class AutoReseed
|
||||
echo "未获取到需要辅种的数据,请多多保种,然后重试! \n";
|
||||
break;
|
||||
}
|
||||
#p($res);exit;
|
||||
// 过滤,只保留正常做种
|
||||
$res = array_filter($res, "qbfilterStatus");
|
||||
// 提取数组:hashString
|
||||
@ -454,12 +453,6 @@ class AutoReseed
|
||||
$url = $_url."/". $configALL[$sites[$sitesID]['site']]['passkey'];
|
||||
break;
|
||||
case 'm-team':
|
||||
$ip_type = '';
|
||||
if (isset($configALL[$sites[$sitesID]['site']]['ip_type'])) {
|
||||
$ip_type = $configALL[$sites[$sitesID]['site']]['ip_type'] == 'ipv6' ? '&ipv6=1' : '';
|
||||
}
|
||||
$url = $_url."&passkey=". $configALL[$sites[$sitesID]['site']]['passkey'] . $ip_type. "&https=1";
|
||||
break;
|
||||
case 'moecat':
|
||||
$ip_type = '';
|
||||
if (isset($configALL[$sites[$sitesID]['site']]['ip_type'])) {
|
||||
@ -501,7 +494,7 @@ class AutoReseed
|
||||
$url = download($_url, $cookie, $userAgent);
|
||||
if(strpos($url,'系统检测到过多的种子下载请求') != false){
|
||||
echo "当前站点触发人机验证,已加入排除列表 \n";
|
||||
ff($sites[$sitesID]['site']. ' 触发人机验证,请重新设置!');
|
||||
ff($sites[$sitesID]['site']. '站点,辅种时触发人机验证!');
|
||||
$configALL[$sites[$sitesID]['site']]['limit'] = 1;
|
||||
self::$noReseed[] = 'hdchina';
|
||||
}
|
||||
@ -537,6 +530,16 @@ class AutoReseed
|
||||
// 添加成功的种子,以infohash为文件名,写入缓存
|
||||
if ($ret) {
|
||||
// 成功的种子
|
||||
switch ($sites[$sitesID]['site']) {
|
||||
case 'hdchina':
|
||||
$url = $details_url;
|
||||
break;
|
||||
case 'hdcity':
|
||||
$url = $_url;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// 文件句柄
|
||||
$resource = fopen(self::$cacheHash . $value['info_hash'].'.txt', "wb");
|
||||
// 成功:返回写入字节数,失败返回false
|
||||
|
@ -80,28 +80,28 @@ function ff($text='', $desp='')
|
||||
* @param string $site
|
||||
* @param array $torrent 种子数组
|
||||
* Array
|
||||
* (
|
||||
* [id] => 118632
|
||||
* [h1] => CCTV5+ 2019 ATP Men's Tennis Final 20191115B HDTV 1080i H264-HDSTV
|
||||
* [title] => 央视体育赛事频道 2019年ATP男子网球年终总决赛 单打小组赛 纳达尔VS西西帕斯 20191115[优惠剩余时间:4时13分]
|
||||
* [details] => https://xxx.me/details.php?id=118632
|
||||
* [download] => https://xxx.me/download.php?id=118632
|
||||
* [filename] => 118632.torrent
|
||||
* [type] => 0
|
||||
* [sticky] => 1
|
||||
* [time] => Array
|
||||
* (
|
||||
* [0] => "2019-11-16 20:41:53">4时13分
|
||||
* [1] => "2019-11-16 14:41:53">1时<br />46分
|
||||
* )
|
||||
* [comments] => 0
|
||||
* [size] => 5232.64MB
|
||||
* [seeders] => 69
|
||||
* [leechers] => 10
|
||||
* [completed] => 93
|
||||
* [percentage] => 100%
|
||||
* [owner] => 匿名
|
||||
* )
|
||||
(
|
||||
[id] => 118632
|
||||
[h1] => CCTV5+ 2019 ATP Men's Tennis Final 20191115B HDTV 1080i H264-HDSTV
|
||||
[title] => 央视体育赛事频道 2019年ATP男子网球年终总决赛 单打小组赛 纳达尔VS西西帕斯 20191115[优惠剩余时间:4时13分]
|
||||
[details] => https://xxx.me/details.php?id=118632
|
||||
[download] => https://xxx.me/download.php?id=118632
|
||||
[filename] => 118632.torrent
|
||||
[type] => 0
|
||||
[sticky] => 1
|
||||
[time] => Array
|
||||
(
|
||||
[0] => "2019-11-16 20:41:53">4时13分
|
||||
[1] => "2019-11-16 14:41:53">1时<br />46分
|
||||
)
|
||||
[comments] => 0
|
||||
[size] => 5232.64MB
|
||||
[seeders] => 69
|
||||
[leechers] => 10
|
||||
[completed] => 93
|
||||
[percentage] => 100%
|
||||
[owner] => 匿名
|
||||
)
|
||||
* @return false|string
|
||||
*/
|
||||
function send($site = '', $torrent = array())
|
||||
|
Loading…
x
Reference in New Issue
Block a user