From d7f783834f511b942b92f387b78aca61fc16730f Mon Sep 17 00:00:00 2001 From: "Max P." Date: Wed, 30 Apr 2025 15:30:48 +0200 Subject: [PATCH] fix(voice_to_text_tray): use get() method for safer access to CURRENT_PRESET mode Signed-off-by: Max P. --- src/pyvtt/voice_to_text_tray.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyvtt/voice_to_text_tray.py b/src/pyvtt/voice_to_text_tray.py index e38f4aa..c588c1b 100755 --- a/src/pyvtt/voice_to_text_tray.py +++ b/src/pyvtt/voice_to_text_tray.py @@ -96,7 +96,7 @@ class WhisperWorker(QThread): print("Kein Ollama Prompt angegeben, nur Whisper Ergebnis verwendet.") # Ergebnis ins Clipboard kopieren - if CURRENT_PRESET["mode"] == "journal": + if CURRENT_PRESET.get("mode") == "journal": today = datetime.date.today().strftime("%Y.%m.%d") journal_path = os.path.join(CONFIGURATION["journal_path"], f"{today} - {CURRENT_PRESET['journal_name']}.md") now = datetime.datetime.now().strftime("%H:%M:%S")