Validate config for subtitle command.
(config: dict)
| 172 | |
| 173 | |
| 174 | def 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 | |
| 192 | def validate_synthesize(config: dict) -> bool: |
no test coverage detected