新增设置-播放设置-显示歌词罗马音
This commit is contained in:
@@ -6,6 +6,7 @@ export const musicInfo = window.musicInfo = reactive({
|
||||
img: null,
|
||||
lrc: null,
|
||||
tlrc: null,
|
||||
rlrc: null,
|
||||
lxlrc: null,
|
||||
rawlrc: null,
|
||||
url: null,
|
||||
|
||||
@@ -43,11 +43,14 @@ export default ({ setting }) => {
|
||||
|
||||
const setLyric = () => {
|
||||
if (!musicInfo.songmid) return
|
||||
const extendedLyrics = []
|
||||
if (setting.value.player.isShowLyricTranslation && musicInfo.tlrc) extendedLyrics.push(musicInfo.tlrc)
|
||||
if (setting.value.player.isShowLyricRoma && musicInfo.rlrc) extendedLyrics.push(musicInfo.rlrc)
|
||||
lrc.setLyric(
|
||||
setting.value.player.isPlayLxlrc && musicInfo.lxlrc ? musicInfo.lxlrc : musicInfo.lrc,
|
||||
setting.value.player.isShowLyricTranslation && musicInfo.tlrc ? musicInfo.tlrc : '',
|
||||
extendedLyrics,
|
||||
)
|
||||
setDesktopLyricInfo('lyric', { lrc: musicInfo.lrc, tlrc: musicInfo.tlrc, lxlrc: musicInfo.lxlrc })
|
||||
setDesktopLyricInfo('lyric', { lrc: musicInfo.lrc, tlrc: musicInfo.tlrc, rlrc: musicInfo.rlrc, lxlrc: musicInfo.lxlrc })
|
||||
|
||||
if (isPlay.value && (musicInfo.url || playMusicInfo.listId == 'download')) {
|
||||
setTimeout(() => {
|
||||
@@ -99,6 +102,7 @@ export default ({ setting }) => {
|
||||
album: musicInfo.album,
|
||||
lrc: musicInfo.lrc,
|
||||
tlrc: musicInfo.tlrc,
|
||||
rlrc: musicInfo.rlrc,
|
||||
lxlrc: musicInfo.lxlrc,
|
||||
isPlay: isPlay.value,
|
||||
line: lyric.line,
|
||||
|
||||
@@ -135,20 +135,22 @@ export default ({ setting }) => {
|
||||
}
|
||||
}
|
||||
const setLrc = (targetSong) => {
|
||||
getLrc(targetSong).then(({ lyric, tlyric, lxlyric, rawInfo }) => {
|
||||
getLrc(targetSong).then(({ lyric, tlyric, rlyric, lxlyric, rawInfo }) => {
|
||||
if (targetSong.songmid !== musicInfo.songmid) return
|
||||
return (
|
||||
setting.value.player.isS2t
|
||||
? Promise.all([
|
||||
lyric ? langS2T(lyric) : Promise.resolve(''),
|
||||
tlyric ? langS2T(tlyric) : Promise.resolve(''),
|
||||
rlyric ? langS2T(rlyric) : Promise.resolve(''),
|
||||
lxlyric ? langS2T(lxlyric) : Promise.resolve(''),
|
||||
])
|
||||
: Promise.resolve([lyric, tlyric, lxlyric])
|
||||
).then(([lyric, tlyric, lxlyric]) => {
|
||||
: Promise.resolve([lyric, tlyric, rlyric, lxlyric])
|
||||
).then(([lyric, tlyric, rlyric, lxlyric]) => {
|
||||
setMusicInfo({
|
||||
lrc: lyric,
|
||||
tlrc: tlyric,
|
||||
rlrc: rlyric,
|
||||
lxlrc: lxlyric,
|
||||
rawlrc: rawInfo.lyric,
|
||||
})
|
||||
@@ -213,6 +215,7 @@ export default ({ setting }) => {
|
||||
img: null,
|
||||
lrc: null,
|
||||
tlrc: null,
|
||||
rlrc: null,
|
||||
lxlrc: null,
|
||||
rawlrc: null,
|
||||
url: null,
|
||||
|
||||
Reference in New Issue
Block a user