From c181a287d0e144a8ed2ecdb9718e790301fd7587 Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Mon, 18 Nov 2024 12:32:06 +0200 Subject: [PATCH] Fix for disabled folder watch running on startup (#994) --- buzz/widgets/transcription_task_folder_watcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buzz/widgets/transcription_task_folder_watcher.py b/buzz/widgets/transcription_task_folder_watcher.py index a5ddf38e0..040417e91 100644 --- a/buzz/widgets/transcription_task_folder_watcher.py +++ b/buzz/widgets/transcription_task_folder_watcher.py @@ -41,6 +41,10 @@ def set_preferences(self, preferences: FolderWatchPreferences): def find_tasks(self): input_directory = self.preferences.input_directory tasks = {task.file_path: task for task in self.tasks.values()} + + if not self.preferences.enabled: + return + for dirpath, dirnames, filenames in os.walk(input_directory): for filename in filenames: file_path = os.path.join(dirpath, filename)