mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix(tuna): handle playPaused (#1)
This commit is contained in:
@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user