@@ -85,7 +85,7 @@ const initIpc = () => {
8585 ) ;
8686
8787 // 给任务栏歌词初始数据
88- window . electron . ipcRenderer . on ( TASKBAR_IPC_CHANNELS . REQUEST_DATA , async ( ) => {
88+ window . electron . ipcRenderer . on ( TASKBAR_IPC_CHANNELS . REQUEST_DATA , async ( ) => {
8989 const musicStore = useMusicStore ( ) ;
9090 const statusStore = useStatusStore ( ) ;
9191
@@ -140,6 +140,9 @@ window.electron.ipcRenderer.on(TASKBAR_IPC_CHANNELS.REQUEST_DATA, async () => {
140140 const statusStore = useStatusStore ( ) ;
141141 if ( player ) {
142142 const { name, artist } = getPlayerInfoObj ( ) || { } ;
143+ const songLyric = statusStore . lyricLoading
144+ ? { lrcData : [ ] , yrcData : [ ] }
145+ : toRaw ( musicStore . songLyric ) ;
143146 window . electron . ipcRenderer . send (
144147 "desktop-lyric:update-data" ,
145148 cloneDeep ( {
@@ -149,8 +152,8 @@ window.electron.ipcRenderer.on(TASKBAR_IPC_CHANNELS.REQUEST_DATA, async () => {
149152 currentTime : statusStore . currentTime ,
150153 songId : musicStore . playSong ?. id ,
151154 songOffset : statusStore . getSongOffset ( musicStore . playSong ?. id ) ,
152- lrcData : musicStore . songLyric . lrcData ?? [ ] ,
153- yrcData : musicStore . songLyric . yrcData ?? [ ] ,
155+ lrcData : songLyric . lrcData ?? [ ] ,
156+ yrcData : songLyric . yrcData ?? [ ] ,
154157 lyricIndex : statusStore . lyricIndex ,
155158 lyricLoading : statusStore . lyricLoading ,
156159 } ) ,
0 commit comments