From 61e3f536e14ad909a1461d54ec1ff35db66cfd93 Mon Sep 17 00:00:00 2001 From: zhiyu1998 <542716863@qq.com> Date: Sun, 11 Aug 2024 16:16:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D=20wb?= =?UTF-8?q?=20=E6=97=A0=E6=B3=95=E5=8F=91=E9=80=81=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=84=9F=E8=B0=A2=E7=BE=A4=E5=8F=8B?= =?UTF-8?q?@=E9=9D=9E=E9=85=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index bd8fa00..1e850b8 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1848,14 +1848,12 @@ export class tools extends plugin { * @param numThreads * @returns {Promise} */ - async downloadVideo(url, isProxy = false, headers = null, numThreads = 1) { + async downloadVideo(url, isProxy = false, headers = null, numThreads = this.videoDownloadConcurrency) { // 构造群信息参数 const { groupPath, target } = this.getGroupPathAndTarget.call(this); await mkdirIfNotExists(groupPath); // 构造header部分内容 const userAgent = "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Mobile Safari/537.36"; - // 用户设置优先策略,逻辑解释:如果使用了这个函数优先查看用户是否设置了大于1的线程,如果设置了优先使用,没设置就开发者设定的函数设置 - numThreads = this.videoDownloadConcurrency !== 1 ? this.videoDownloadConcurrency : numThreads; // 构造代理参数 const proxyOption = {