From 5d0adf5f669fc1748d1e523c4290947f4dc237ec Mon Sep 17 00:00:00 2001 From: zhiyu1998 Date: Fri, 10 Feb 2023 12:48:40 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8Dwindows?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=BD=BF=E7=94=A8=E8=A7=A3=E6=9E=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 05acba7..b4108c2 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -194,15 +194,17 @@ export class tools extends plugin { await getDownloadUrl(url) .then(data => { - this.downBili(path, data.videoUrl, data.audioUrl) + this.downBili(`${path}temp`, data.videoUrl, data.audioUrl) .then(data => { - e.reply(segment.video(`${ path }.mp4`)) + e.reply(segment.video(`${ path }temp.mp4`)) }) - .catch(data => { + .catch(err => { + console.log(err) e.reply('解析失败,请重试一下') }); }) .catch(err => { + console.log(err) e.reply('解析失败,请重试一下') }); return true @@ -487,7 +489,7 @@ export class tools extends plugin { ), ]) .then(data => { - return mergeFileToMp4(data[0].fullFileName, data[1].fullFileName, title + '.mp4'); + mergeFileToMp4(data[0].fullFileName, data[1].fullFileName, title + '.mp4') }) }