Song provider: call callbacks when data is updated

This commit is contained in:
TC
2021-03-29 21:59:45 +02:00
parent 05eee7cb0f
commit ebe8755613

View File

@ -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;
}; };