Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Commit e7f8609

Browse files
✨ feat: 如果当前播放的歌词是从QM获取的 则全屏播放器左侧不显示YRC 显示 QRC
1 parent e5a3f38 commit e7f8609

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/components/Player/PlayerMeta/PlayerData.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ const qualityOptions = computed<DropdownOption[]>(() => {
212212
const lyricMode = computed(() => {
213213
if (settingStore.showYrc) {
214214
if (statusStore.usingTTMLLyric) return "TTML";
215-
if (musicStore.isHasYrc) return "YRC";
215+
if (musicStore.isHasYrc) {
216+
// 如果是从QQ音乐获取的歌词,显示QRC
217+
return statusStore.usingQRCLyric ? "QRC" : "YRC";
218+
}
216219
}
217220
return musicStore.isHasLrc ? "LRC" : "NO-LRC";
218221
});

src/core/player/LyricManager.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class LyricManager {
3636
// 重置歌词数据
3737
musicStore.setSongLyric({}, true);
3838
statusStore.usingTTMLLyric = false;
39+
statusStore.usingQRCLyric = false;
3940
// 重置歌词索引
4041
statusStore.lyricIndex = -1;
4142
statusStore.lyricLoading = false;
@@ -376,6 +377,8 @@ class LyricManager {
376377
await Promise.allSettled([adoptTTML(), adoptLRC()]);
377378
// 优先使用 TTML
378379
statusStore.usingTTMLLyric = ttmlAdopted;
380+
// 设置是否使用 QRC 歌词(来自 QQ 音乐,且未被 TTML 覆盖)
381+
statusStore.usingQRCLyric = qqMusicAdopted && !ttmlAdopted;
379382
return await this.applyChineseVariant(this.handleLyricExclude(result));
380383
}
381384

@@ -425,6 +428,7 @@ class LyricManager {
425428
lrcData: aligned.lrcData,
426429
yrcData: qqLyric.yrcData,
427430
};
431+
statusStore.usingQRCLyric = true;
428432
}
429433
}
430434
return await this.applyChineseVariant(aligned);

src/stores/status.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ interface StatusState {
5656
pureLyricMode: boolean;
5757
/** 当前是否正使用 TTML 歌词 */
5858
usingTTMLLyric: boolean;
59+
/** 当前是否正使用 QRC 歌词(来自QQ音乐) */
60+
usingQRCLyric: boolean;
5961
/** 当前歌曲音质 */
6062
songQuality: QualityType | undefined;
6163
/** 当前播放索引 */
@@ -153,6 +155,7 @@ export const useStatusStore = defineStore("status", {
153155
songCoverTheme: {},
154156
pureLyricMode: false,
155157
usingTTMLLyric: false,
158+
usingQRCLyric: false,
156159
songQuality: undefined,
157160
playIndex: -1,
158161
lyricIndex: -1,

0 commit comments

Comments
 (0)