mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +00:00
Song provider: call callbacks when data is updated
This commit is contained in:
@ -79,10 +79,12 @@ const registerProvider = (win) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// This will be called when the song-info-front finds a new request with song data
|
// This will be called when the song-info-front finds a new request with song data
|
||||||
ipcMain.on(
|
ipcMain.on("song-info-request", async (_, responseText) => {
|
||||||
"song-info-request",
|
await handleData(responseText, win);
|
||||||
async (_, responseText) => await handleData(responseText, win)
|
callbacks.forEach((c) => {
|
||||||
);
|
c(songInfo);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
return registerCallback;
|
return registerCallback;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user