From 78bac31c5f703f29dcbe221c8227f415a2b62007 Mon Sep 17 00:00:00 2001 From: fiatcode Date: Fri, 27 Feb 2026 23:20:56 +0700 Subject: [PATCH] fix: resolve AttributeError by calling call_from_thread on self.app --- src/faceblur/app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/faceblur/app.py b/src/faceblur/app.py index 748b171..7ff130d 100644 --- a/src/faceblur/app.py +++ b/src/faceblur/app.py @@ -197,7 +197,7 @@ class ProcessingScreen(Screen): def _update_ui(self, phase: str, status: str, progress: float) -> None: """Thread-safe UI update.""" - self.call_from_thread(self._do_update_ui, phase, status, progress) + self.app.call_from_thread(self._do_update_ui, phase, status, progress) def _do_update_ui(self, phase: str, status: str, progress: float) -> None: self.query_one("#phase-label", Label).update(phase) @@ -268,7 +268,7 @@ class ProcessingScreen(Screen): # Write face samples and transition to selection screen face_samples = self._write_face_samples() - self.call_from_thread( + self.app.call_from_thread( self.app.push_screen, FaceSelectionScreen( video_path=self.video_path, @@ -571,7 +571,7 @@ class EncodingScreen(Screen): self.run_worker(self._encode(), thread=True) def _update_ui(self, status: str, progress: float) -> None: - self.call_from_thread(self._do_update_ui, status, progress) + self.app.call_from_thread(self._do_update_ui, status, progress) def _do_update_ui(self, status: str, progress: float) -> None: self.query_one("#encoding-status", Label).update(status) @@ -597,7 +597,7 @@ class EncodingScreen(Screen): progress_callback=on_progress, ) self._update_ui("Encoding complete!", 100) - self.call_from_thread(self._show_done) + self.app.call_from_thread(self._show_done) except Exception as e: self._update_ui(f"Error: {e}", 0)