Skip to content

Commit 726f10a

Browse files
committed
🐞 fix: 修复本地qrc歌词判断
1 parent d629dd6 commit 726f10a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/core/player/LyricManager.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,13 @@ class LyricManager {
523523
if (!lyric) return { lrcData: [], yrcData: [] };
524524
// YRC 直接解析
525525
if (format === "yrc") {
526-
const lines = parseYrc(lyric) || [];
526+
let lines: LyricLine[] = [];
527+
// 检测是否为 XML 格式 (QRC)
528+
if (lyric.trim().startsWith("<") || lyric.includes("<QrcInfos>")) {
529+
lines = this.parseQRCLyric(lyric);
530+
} else {
531+
lines = parseYrc(lyric) || [];
532+
}
527533
statusStore.usingTTMLLyric = false;
528534
return await this.applyChineseVariant({ lrcData: [], yrcData: lines });
529535
}

0 commit comments

Comments
 (0)