From d928a50aa0de79281732efd2f110ba455e4d17c2 Mon Sep 17 00:00:00 2001 From: MiX1024 <116636746+MiX1024@users.noreply.github.com> Date: Sun, 21 Apr 2024 21:16:28 +0800 Subject: [PATCH] Update tools.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改油管解析,使其能直接播放 --- apps/tools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 9baf21d..c724c19 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1149,7 +1149,7 @@ export class tools extends plugin { */ async dy2b(path,url) { return new Promise((resolve, reject) => { - const command = `yt-dlp ${isOversea ? "" : `--proxy ${this.myProxy}`} -P ${path} -o "temp.%(ext)s" -f 'bv[height<=720][ext=mp4]+ba[ext=m4a]' --merge-output-format "mp4" ${url}`; + const command = `yt-dlp ${isOversea ? "" : `--proxy ${this.myProxy}`} -P ${path} -o "temp.%(ext)s" -f 'best[height<=720][ext=mp4]' --merge-output-format "mp4" ${url}`; exec(command, (error, stdout) => { if (error) { console.error(`Error executing command: ${error}`); @@ -1163,7 +1163,7 @@ export class tools extends plugin { } async sy2b(e){ - let videoSizeLimit = 15 + let videoSizeLimit = 30 const isOversea = await this.isOverseasServer(); if (!isOversea && !(await testProxy(this.proxyAddr, this.proxyPort))) { e.reply("检测到没有梯子,无法解析油管");