From 005788827d00270e386986f2e003224079d3da53 Mon Sep 17 00:00:00 2001 From: "iyuu.cn" <367013672@qq.com> Date: Mon, 1 Jun 2020 21:45:38 +0800 Subject: [PATCH] =?UTF-8?q?SSD=E5=8A=A0=E5=85=A5=E8=BE=85=E7=A7=8D?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E5=99=A8=EF=BC=88=E9=99=90=E5=88=B6=E6=AF=8F?= =?UTF-8?q?=E6=AC=A1=E8=BE=85=E7=A7=8D10=E4=B8=AA=EF=BC=89=EF=BC=8C?= =?UTF-8?q?=E9=99=8D=E4=BD=8E=E5=88=9D=E6=AC=A1=E8=BE=85=E7=A7=8D=E8=BF=87?= =?UTF-8?q?=E5=A4=9Aban=E7=A6=81IP=E7=9A=84=E5=8F=AF=E8=83=BD=E6=80=A7?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AutoReseed.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/AutoReseed.php b/app/AutoReseed.php index 40321f9..79fdeb0 100644 --- a/app/AutoReseed.php +++ b/app/AutoReseed.php @@ -13,7 +13,7 @@ use IYUU\Library\Table; class AutoReseed { // 版本号 - const VER = '1.7.9'; + const VER = '1.8.1'; // RPC连接 private static $links = []; // 客户端配置 @@ -218,7 +218,7 @@ class AutoReseed $errmsg = isset($result['result']) ? $result['result'] : '未知错误,请稍后重试!'; if (strpos($errmsg, 'http error 404: Not Found') !== false) { self::sendNotify('404'); - } else if (strpos($errmsg, 'http error 403: Forbidden') !== false) { + } elseif (strpos($errmsg, 'http error 403: Forbidden') !== false) { self::sendNotify('403'); } print "-----RPC添加种子任务,失败 [{$errmsg}]" . PHP_EOL.PHP_EOL; @@ -412,6 +412,12 @@ class AutoReseed $reseedPass = false; // 特殊站点:种子元数据推送给下载器 switch ($siteName) { + case 'ssd': + // 辅种计数器 + if (isset($configALL[$siteName]['count']) && $configALL[$siteName]['count'] > 10) { + $configALL[$siteName]['limit'] = 1; + } + break; case 'hdchina': $cookie = isset($configALL[$siteName]['cookie']) ? $configALL[$siteName]['cookie'] : ''; $userAgent = $configALL['default']['userAgent']; @@ -525,6 +531,12 @@ class AutoReseed case 'hdcity': $url = $_url; break; + case 'ssd': + // 辅种计数器 + if ($ret) { + $configALL[$siteName]['count']++; + } + break; default: break; }