reset deviation on file change

This commit is contained in:
j 2023-11-20 11:28:47 +00:00
parent 8db3a0f6e9
commit 73774b5293

View file

@ -110,6 +110,7 @@ class Sync(Thread):
self.adjust_position() self.adjust_position()
if self._pos != self.mpv.playlist_current_pos: if self._pos != self.mpv.playlist_current_pos:
self._pos = self.mpv.playlist_current_pos self._pos = self.mpv.playlist_current_pos
self.deviations = collections.deque(maxlen=10)
try: try:
track = self.mpv.playlist[self._pos] track = self.mpv.playlist[self._pos]
logger.error("%s %s", datetime.now(), track["filename"]) logger.error("%s %s", datetime.now(), track["filename"])