From 58b5a2681bc42b7d9ad6ae17c63dff9152145ea0 Mon Sep 17 00:00:00 2001 From: raivis Date: Mon, 18 Nov 2024 11:54:45 +0200 Subject: [PATCH] Fix for disabled folder watch running on startup --- 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)