From ea83be1b7f0b2dbbac24f9326df9a776b8a8385c Mon Sep 17 00:00:00 2001 From: j Date: Fri, 17 Nov 2023 01:13:28 +0100 Subject: [PATCH] more debug info --- player/player.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/player/player.py b/player/player.py index 1ed7b4d..b2d30cc 100755 --- a/player/player.py +++ b/player/player.py @@ -200,6 +200,11 @@ class Sync(Thread): self.mpv.playlist_play_index(self.main.playlist_current_pos) self.mpv.pause = False self.mpv.wait_until_playing() + try: + track = self.mpv.playlist[self.mpv.playlist_current_pos] + logger.error("%s %s", datetime.now(), track["filename"]) + except: + pass self.mpv.pause = True pos = self.main.time_pos + SYNC_JUMP_AHEAD #print(pos, self.mpv.playlist_current_pos, self.mpv.time_pos) @@ -212,6 +217,11 @@ class Sync(Thread): #print(deviation, abs(deviation) - (time.time() - sync_timer)) if abs(deviation) - (time.time() - sync_timer) < 0: self.mpv.pause = False + try: + track = self.mpv.playlist[self.mpv.playlist_current_pos] + logger.error("%s %s %s", datetime.now(), track["filename"], pos) + except: + pass break self.last_sync = time.time()