新增调换翻译歌词与罗马音歌词位置设置,优化歌词显示逻辑(#2451)

This commit is contained in:
lyswhut
2025-07-09 08:58:34 +08:00
parent 4c6257c145
commit ad0c0f37c9
14 changed files with 27 additions and 2 deletions
+3 -1
View File
@@ -160,8 +160,10 @@ export const setLyric = () => {
if (!musicInfo.id) return
if (musicInfo.lrc) {
const extendedLyrics = []
if (appSetting['player.isShowLyricTranslation'] && musicInfo.tlrc) extendedLyrics.push(musicInfo.tlrc)
if (appSetting['player.isShowLyricRoma'] && musicInfo.rlrc) extendedLyrics.push(musicInfo.rlrc)
if (appSetting['player.isShowLyricTranslation'] && musicInfo.tlrc) extendedLyrics.push(musicInfo.tlrc)
if (appSetting['player.isSwapLyricTranslationAndRoma']) extendedLyrics.reverse()
lrc.setLyric(
appSetting['player.isPlayLxlrc'] && musicInfo.lxlrc ? musicInfo.lxlrc : musicInfo.lrc,
extendedLyrics,
@@ -25,6 +25,7 @@ export default () => {
watch(() => appSetting['player.isShowLyricTranslation'], setLyric)
watch(() => appSetting['player.isShowLyricRoma'], setLyric)
watch(() => appSetting['player.isSwapLyricTranslationAndRoma'], setLyric)
watch(() => appSetting['player.isPlayLxlrc'], setLyric)
window.app_event.on('play', play)