mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 19:31: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:
@ -3,6 +3,7 @@ import { BrowserWindow } from 'electron';
|
||||
import registerCallback, {
|
||||
MediaType,
|
||||
type SongInfo,
|
||||
SongInfoEvent,
|
||||
} from '@/providers/song-info';
|
||||
import { createBackend } from '@/utils';
|
||||
|
||||
@ -70,7 +71,8 @@ export const backend = createBackend<
|
||||
await this.createSessions(config, setConfig);
|
||||
this.setConfig = setConfig;
|
||||
|
||||
registerCallback((songInfo: SongInfo) => {
|
||||
registerCallback((songInfo: SongInfo, event) => {
|
||||
if (event === SongInfoEvent.TimeChanged) return;
|
||||
// Set remove the old scrobble timer
|
||||
clearTimeout(scrobbleTimer);
|
||||
if (!songInfo.isPaused) {
|
||||
|
||||
Reference in New Issue
Block a user