From efd5e7310ac64383f6344f9ae68485c172ef4517 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 14 Nov 2023 16:32:27 +0100 Subject: [PATCH] sync reads position, log sync --- player/player.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/player/player.py b/player/player.py index 906be86..cd446dc 100755 --- a/player/player.py +++ b/player/player.py @@ -75,11 +75,11 @@ class Sync(Thread): if self.is_main: time.sleep(0.5) else: - self.read_position_main() - #self.adjust_position() if self.need_to_sync: self.sync_to_main() self.need_to_sync = False + else: + self.read_position_main() self.reload_playlist() if self._tick and abs(time.time() - self._tick) > 60: logger.error("player is stuck") @@ -186,6 +186,7 @@ class Sync(Thread): return float(sum(sorted(lst)[quotient - 1:quotient + 1]) / 2.0) def sync_to_main(self): + logger.error('sync to main') self.read_position_main() #print(self.main.playlist_current_pos) if self.main.playlist_current_pos != self.mpv.playlist_current_pos: