sync reads position, log sync

This commit is contained in:
j 2023-11-14 16:32:27 +01:00
parent a604bdfab9
commit efd5e7310a

View file

@ -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: