From 18fa73adb5a57aa2ad2ff2058c29b6e40eb03340 Mon Sep 17 00:00:00 2001 From: MoYingJi Date: Sat, 3 Jan 2026 00:00:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(lyrics):=20handleLyricExclude=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=88=A4=E6=96=AD=E4=B8=8D=E6=8E=92=E9=99=A4=20TTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/player/LyricManager.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/player/LyricManager.ts b/src/core/player/LyricManager.ts index 1177963ca..978d26d6a 100644 --- a/src/core/player/LyricManager.ts +++ b/src/core/player/LyricManager.ts @@ -322,6 +322,7 @@ class LyricManager { */ private handleLyricExclude(lyricData: SongLyric): SongLyric { const settingStore = useSettingStore(); + const statusStore = useStatusStore(); const musicStore = useMusicStore(); const { enableExcludeLyrics, excludeUserKeywords, excludeUserRegexes } = settingStore; @@ -362,13 +363,11 @@ class LyricManager { const lrcData = stripLyricMetadata(lyricData.lrcData || [], options); - // FIXME: 这部分逻辑有问题,因为 TTML 歌词 (硬性规定没有元数据行) 和网易云的 YRC 歌词都塞进 yrcData 了,无法区分, - // 不开排除 TTML 就不能清理 YRC 歌词 - // 暂时关掉,因为 stripLyricMetadata 应该足够稳健,不会删掉正常的歌词行 let yrcData = lyricData.yrcData || []; - // if (statusStore.usingTTMLLyric && enableExcludeTTML) { - yrcData = stripLyricMetadata(yrcData, options); - // } + + if (!statusStore.usingTTMLLyric || settingStore.enableExcludeTTML) { + yrcData = stripLyricMetadata(yrcData, options); + } return { lrcData,