From 5e7aff4d7f018621671b073c1c3060cdd857222e Mon Sep 17 00:00:00 2001 From: Hirad Date: Mon, 7 Jul 2025 12:54:17 +0330 Subject: [PATCH] fix resolve_prompt --- src/srtify/core/translator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/srtify/core/translator.py b/src/srtify/core/translator.py index 782458c..a47ac42 100644 --- a/src/srtify/core/translator.py +++ b/src/srtify/core/translator.py @@ -92,7 +92,7 @@ class TranslatorApp: """ Resolve which prompt to use based on options """ if options.get('custom_prompt'): return options['custom_prompt'].strip() - elif options.get('prompts.py'): + elif options.get('prompt'): results = self.prompts.search_prompts(options['prompt'].strip()) if results: if len(results) == 1: @@ -116,10 +116,10 @@ class TranslatorApp: default_lang, default_batch_size = self.settings.get_translation_config() api_key = self.settings.get_api_key() - input_path = Path(options.get('input_path', input_dir)) - output_path = Path(options.get('output_path', output_dir)) - language = options.get('language', default_lang) - batch_size = options.get('batch_size', default_batch_size) + input_path = Path(options.get('input_path') or input_dir) + output_path = Path(options.get('output_path') or output_dir) + language = options.get('language') or default_lang + batch_size = options.get('batch_size') or default_batch_size if not api_key: print("❌ No API key found. Use 'subtitle-translator settings' to configure.")