From 0d7fbe63be625d69dba7872387fd2b843caa15d7 Mon Sep 17 00:00:00 2001 From: CSSZYF <63802741+CSSZYF@users.noreply.github.com> Date: Tue, 3 Jun 2025 20:41:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=A3=E6=9E=90=20YouTube?= =?UTF-8?q?=20=E8=A7=86=E9=A2=91=E4=BF=A1=E6=81=AF=E6=97=B6=E9=98=BB?= =?UTF-8?q?=E5=A1=9E=E4=B8=BB=E8=BF=9B=E7=A8=8B=EF=BC=8C=E6=8F=90=E9=AB=98?= =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E5=93=8D=E5=BA=94=E6=96=B0=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E5=8F=8A=E6=97=B6=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 8614b73..6e40d8e 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -641,7 +641,7 @@ export class tools extends plugin { // 下载逻辑 const path = this.getCurDownloadPath(e); await checkAndRemoveFile(path + "/temp.mp4"); - const title = ytDlpGetTilt(url, isOversea, this.myProxy); + const title = await ytDlpGetTilt(url, isOversea, this.myProxy); e.reply(`${ this.identifyPrefix }识别:TikTok,视频下载中请耐心等待 \n${ title }`); await ytDlpHelper(path, cleanedTiktokUrl, isOversea, this.myProxy, this.videoDownloadConcurrency); await this.sendVideoToUpload(e, `${ path }/temp.mp4`); @@ -2150,7 +2150,7 @@ export class tools extends plugin { await checkAndRemoveFile(path + "/temp.flac"); await checkAndRemoveFile(path + "/thumbnail.png"); await ytDlpGetThumbnail(path, url, isOversea, this.myProxy, this.youtubeCookiePath); - const title = ytDlpGetTilt(url, isOversea, this.myProxy, this.youtubeCookiePath).toString().replace(/\n/g, ''); + const title = (await ytDlpGetTilt(url, isOversea, this.myProxy, this.youtubeCookiePath)).toString().replace(/\n/g, ''); // 音频逻辑 if (url.includes("music")) { @@ -2168,7 +2168,7 @@ export class tools extends plugin { } // 下面为视频逻辑 - const Duration = convertToSeconds(ytDlpGetDuration(url, isOversea, this.myProxy, this.youtubeCookiePath).toString().replace(/\n/g, '')); + const Duration = convertToSeconds((await ytDlpGetDuration(url, isOversea, this.myProxy, this.youtubeCookiePath)).toString().replace(/\n/g, '')); // logger.info('时长------',Duration) if (Duration > this.youtubeDuration) { e.reply([