mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
fix: callback for time-changed event (#2577)
Co-authored-by: Derek Alsop <15299183+Azorant@users.noreply.github.com>
This commit is contained in:
@ -30,7 +30,7 @@ export default createPlugin({
|
||||
config: {
|
||||
enabled: false,
|
||||
},
|
||||
backend() {
|
||||
backend({ ipc }) {
|
||||
const secToMilisec = (t?: number) =>
|
||||
t ? Math.round(Number(t) * 1e3) : undefined;
|
||||
const previousStatePaused = null;
|
||||
@ -65,6 +65,10 @@ export default createPlugin({
|
||||
});
|
||||
};
|
||||
|
||||
ipc.on('ytmd:player-api-loaded', () =>
|
||||
ipc.send('ytmd:setup-time-changed-listener'),
|
||||
);
|
||||
|
||||
registerCallback((songInfo) => {
|
||||
if (!songInfo.title && !songInfo.artist) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user