开放API 添加歌词翻译字段
This commit is contained in:
@@ -87,7 +87,7 @@ export const init = () => {
|
||||
onPlay(line, text) {
|
||||
setText(text, Math.max(line, 0))
|
||||
setStatusText(text)
|
||||
window.app_event.lyricLinePlay(text)
|
||||
window.app_event.lyricLinePlay(text, line)
|
||||
// console.log(line, text)
|
||||
},
|
||||
onSetLyric(lines, offset) { // listening lyrics seting event
|
||||
|
||||
@@ -9,6 +9,7 @@ import { throttle } from '@common/utils'
|
||||
import { pause, play, playNext, playPrev } from '@renderer/core/player'
|
||||
import { playProgress } from '@renderer/store/player/playProgress'
|
||||
import { appSetting } from '@renderer/store/setting'
|
||||
import { lyric } from '@renderer/store/player/lyric'
|
||||
|
||||
export default () => {
|
||||
// const setVisibleDesktopLyric = useCommit('setVisibleDesktopLyric')
|
||||
@@ -58,9 +59,11 @@ export default () => {
|
||||
picUrl: musicInfo.pic ?? '',
|
||||
})
|
||||
}
|
||||
const handleSetLyricLine = (text: string) => {
|
||||
const handleSetLyricLine = (text: string, line: number) => {
|
||||
let curLine = lyric.lines[line]?.extendedLyrics.join('\n') ?? ''
|
||||
sendPlayerStatus({
|
||||
lyricLineText: text,
|
||||
lyricLineAllText: curLine ? text + '\n' + curLine : text,
|
||||
})
|
||||
}
|
||||
// const handleSetTaskbarThumbnailClip = (clip) => {
|
||||
|
||||
Reference in New Issue
Block a user