mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: use osdlyrics dbus interface to send lyric contents
This commit is contained in:
parent
845bc8a921
commit
ed1daab1f6
8 changed files with 45 additions and 55 deletions
|
|
@ -629,16 +629,17 @@ export default class {
|
|||
return ipcRenderer?.send('metadata', metadata);
|
||||
}
|
||||
|
||||
let lyricName = track.ar.map(ar => ar.name).join(', ') + '-' + track.name;
|
||||
let lyricContent = await getLyric(track.id);
|
||||
|
||||
if (!lyricContent.lrc.lyric) {
|
||||
if (!lyricContent.lrc || !lyricContent.lrc.lyric) {
|
||||
return ipcRenderer?.send('metadata', metadata);
|
||||
}
|
||||
ipcRenderer.send('saveLyric', {
|
||||
name: lyricName,
|
||||
lyric: lyricContent.lrc.lyric,
|
||||
|
||||
ipcRenderer.send('sendLyrics', {
|
||||
track,
|
||||
lyrics: lyricContent.lrc.lyric,
|
||||
});
|
||||
|
||||
ipcRenderer.on('saveLyricFinished', () => {
|
||||
ipcRenderer?.send('metadata', metadata);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue