mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +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
|
||||
ipcMain.on(
|
||||
"song-info-request",
|
||||
async (_, responseText) => await handleData(responseText, win)
|
||||
);
|
||||
ipcMain.on("song-info-request", async (_, responseText) => {
|
||||
await handleData(responseText, win);
|
||||
callbacks.forEach((c) => {
|
||||
c(songInfo);
|
||||
});
|
||||
});
|
||||
|
||||
return registerCallback;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user