新增调换翻译歌词与罗马音歌词位置设置,优化歌词显示逻辑(#2451)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user