From 854121884bb89e5fbf165303142d0c7acf679cda Mon Sep 17 00:00:00 2001 From: "iyuu.cn" <367013672@qq.com> Date: Tue, 18 Feb 2020 14:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BD=AC=E7=A7=BB=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E8=B7=B3=E6=A0=A1=E9=AA=8C=E3=80=81=E8=BD=AC=E7=A7=BB?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=88=A0=E9=99=A4=E5=BD=93=E5=89=8D=E5=81=9A?= =?UTF-8?q?=E7=A7=8D=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AutoReseed.php | 11 +++++++---- config/config.sample.php | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/AutoReseed.php b/app/AutoReseed.php index 04275ff..5c8ca34 100644 --- a/app/AutoReseed.php +++ b/app/AutoReseed.php @@ -587,7 +587,9 @@ class AutoReseed $rpcKey = self::$move[0]; $type = self::$links[$rpcKey]['type']; if ($type == 'qBittorrent') { - #$extra_options['skip_checking'] = "true"; //转移时,跳校验 + if (isset($configALL['default']['move']['skip_check']) && $configALL['default']['move']['skip_check'] === 1) { + $extra_options['skip_checking'] = "true"; //转移成功,跳校验 + } } else { $extra_options = array(); } @@ -598,9 +600,10 @@ class AutoReseed */ $log = $info_hash.PHP_EOL.$torrentPath.PHP_EOL.$downloadDir.PHP_EOL.PHP_EOL; if ($ret) { - // 删除做种,不删资源 - #self::$links[$k]['rpc']->delete($torrentDelete); - + //转移成功时,删除做种,不删资源 + if (isset($configALL['default']['move']['delete_torrent']) && $configALL['default']['move']['delete_torrent'] === 1) { + self::$links[$k]['rpc']->delete($torrentDelete); + } // 转移成功的种子,以infohash为文件名,写入缓存 wlog($log, $info_hash, self::$cacheMove); wlog($log, 'MoveSuccess'.$k); diff --git a/config/config.sample.php b/config/config.sample.php index 7f64f41..ddf84ef 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -56,6 +56,8 @@ return array( // 当前路径 => 目标路径 '/downloads' => '/volume1', ), + 'skip_check' => 0, //转移成功,跳校验 + 'delete_torrent' => 0, //转移成功,删除当前做种 ), 'workingMode' => 0, 'watch' => '/volume1/downloads',