sync reads position, log sync
This commit is contained in:
parent
a604bdfab9
commit
efd5e7310a
1 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue