MCPcopy
hub / github.com/WEIFENG2333/VideoCaptioner / validate_subtitle

Function validate_subtitle

videocaptioner/cli/validators.py:174–189  ·  view source on GitHub ↗

Validate config for subtitle command.

(config: dict)

Source from the content-addressed store, hash-verified

172
173
174def validate_subtitle(config: dict) -> bool:
175 """Validate config for subtitle command."""
176 needs_llm = False
177
178 optimize = get(config, "subtitle.optimize", True)
179 translate = get(config, "subtitle.translate", False)
180 translator = get(config, "translate.service", "bing")
181
182 if optimize:
183 needs_llm = True
184 if translate and translator == "llm":
185 needs_llm = True
186
187 if needs_llm:
188 return validate_llm(config)
189 return True
190
191
192def validate_synthesize(config: dict) -> bool:

Callers 1

validate_processFunction · 0.85

Calls 2

getFunction · 0.90
validate_llmFunction · 0.85

Tested by

no test coverage detected