Skip to content

Commit daa73a1

Browse files
FujiwaraChokiclaude
andcommitted
Fix generate_script() ignoring retry result when script is too long
The recursive retry call was missing `return`, so the original too-long script always overwrote the retried result. This made the >5000 char length guard completely ineffective. The same pattern is used correctly in generate_metadata() and generate_prompts(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a9e3f76 commit daa73a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/classes/YouTube.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def generate_script(self) -> str:
190190
if len(completion) > 5000:
191191
if get_verbose():
192192
warning("Generated Script is too long. Retrying...")
193-
self.generate_script()
193+
return self.generate_script()
194194

195195
self.script = completion
196196

0 commit comments

Comments
 (0)