mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-18 06:07:48 +00:00
feat: osdlyrics desktop lyrics support
This commit is contained in:
parent
ce778afff6
commit
022f740c3f
9 changed files with 99 additions and 2 deletions
|
|
@ -28,6 +28,8 @@ export function createMpris(window) {
|
|||
});
|
||||
|
||||
ipcMain.on('metadata', (e, metadata) => {
|
||||
// 更新 Mpris 状态前将位置设为0, 否则 OSDLyrics 获取到的进度是上首音乐切换时的进度
|
||||
player.getPosition = () => 0;
|
||||
player.metadata = {
|
||||
'mpris:trackid': player.objectPath('track/' + metadata.trackId),
|
||||
'mpris:artUrl': metadata.artwork[0].src,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue