From 4ac62f884816c66c1ae03655b0ffb4a669a05cef Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 8 Feb 2021 16:46:57 +1000 Subject: [PATCH] fix media check not updating progress --- qt/aqt/mediacheck.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qt/aqt/mediacheck.py b/qt/aqt/mediacheck.py index c1131357f..01f049a7c 100644 --- a/qt/aqt/mediacheck.py +++ b/qt/aqt/mediacheck.py @@ -58,9 +58,15 @@ class MediaChecker: self._progress_timer.stop() self._progress_timer = None if enabled: - self._progress_timer = self.mw.progress.timer(100, self._on_progress, True) + self._progress_timer = timer = QTimer() + timer.setSingleShot(False) + timer.setInterval(100) + qconnect(timer.timeout, self._on_progress) + timer.start() def _on_progress(self) -> None: + if not self.mw.col: + return progress = self.mw.col.latest_progress() if not progress.HasField("media_check"): return