From ea1d21a3eff4057013099be2cb6598f1076111da Mon Sep 17 00:00:00 2001 From: lyswhut Date: Mon, 14 Mar 2022 10:24:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AD=8C=E8=AF=8D=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/utils/music/kw/lyric.js | 4 ++-- src/renderer/utils/music/kw/util.js | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/renderer/utils/music/kw/lyric.js b/src/renderer/utils/music/kw/lyric.js index f2e67f00..10631ad6 100644 --- a/src/renderer/utils/music/kw/lyric.js +++ b/src/renderer/utils/music/kw/lyric.js @@ -195,8 +195,8 @@ export default { } catch { lrcInfo.lxlyric = '' } - if (lrcInfo.lxlyric) lrcInfo.lyric = lrcInfo.lyric.replace(lrcTools.rxps.wordTimeAll, '') - // console.log(lrcInfo.lxlyric) + lrcInfo.lyric = lrcInfo.lyric.replace(lrcTools.rxps.wordTimeAll, '') + // console.log(lrcInfo) return lrcInfo }) }) diff --git a/src/renderer/utils/music/kw/util.js b/src/renderer/utils/music/kw/util.js index 5dbf98a2..b4139faf 100644 --- a/src/renderer/utils/music/kw/util.js +++ b/src/renderer/utils/music/kw/util.js @@ -108,10 +108,7 @@ export const lrcTools = { words = '' } const wordTimes = words.match(this.rxps.wordTimeAll) - if (!wordTimes) { - this.isOK = false - return - } + if (!wordTimes) return // console.log(wordTimes) for (const timeStr of wordTimes) { const result = this.rxps.wordTime.exec(timeStr) @@ -139,6 +136,7 @@ export const lrcTools = { } }, parse(lrc) { + // console.log(lrc) const lines = lrc.split(/\r\n|\r|\n/) const tools = Object.create(this) tools.isOK = true