From e9b5e21f195be90377592214546f08101d0b86d8 Mon Sep 17 00:00:00 2001 From: helloplhm-qwq Date: Mon, 19 Jun 2023 20:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtx=E6=BA=90=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E6=AD=8C=E8=AF=8D=E8=A7=A3=E6=9E=90=E4=B8=8D=E5=85=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/utils/musicSdk/tx/lyric.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/utils/musicSdk/tx/lyric.js b/src/renderer/utils/musicSdk/tx/lyric.js index 6e1ac45c..217490a8 100644 --- a/src/renderer/utils/musicSdk/tx/lyric.js +++ b/src/renderer/utils/musicSdk/tx/lyric.js @@ -148,12 +148,12 @@ const parseTools = { const words = line.replace(timeTagRxp, '') if (!words.trim()) return const tag = result[0].replace(/\d]/, '').replace(this.rxps.timeLabelFixRxp, '') - + let mstag = result[0].replace(/\d]/, '').split('.')[1] while (lrcLines.length) { const lrcLine = lrcLines.shift() const lrcLineResult = timeTagRxp.exec(lrcLine) if (!lrcLineResult) continue - if (lrcLineResult[0].includes(tag)) { + if (lrcLineResult[0].includes(tag) || Math.abs(lrcLineResult[0].replace(/\d]/, '').split('.')[1] - mstag) < 100) { newLrc.push(line.replace(timeTagRxp, lrcLineResult[0])) break }