fix(tuna): handle playPaused (#1)

This commit is contained in:
JellyBrick
2023-08-29 15:43:58 +09:00
committed by GitHub
parent f2149e3b72
commit 2f73548701

View File

@ -36,6 +36,12 @@ module.exports = async (win) => {
data.progress = secToMilisec(t); data.progress = secToMilisec(t);
post(data); post(data);
}); });
ipcMain.on('playPaused', (_, { isPaused, elapsedSeconds }) => {
if (!data.title) return;
data.status = isPaused ? 'stopped' : 'playing';
data.progress = secToMilisec(elapsedSeconds);
post(data);
});
registerCallback((songInfo) => { registerCallback((songInfo) => {
if (!songInfo.title && !songInfo.artist) { if (!songInfo.title && !songInfo.artist) {