pub async fn execute_with_config(
args: MatchArgs,
config_service: Arc<dyn ConfigService>,
) -> Result<()>Expand description
Execute the AI-powered subtitle matching operation with injected configuration service.
This function provides the new dependency injection interface for the match command, accepting a configuration service instead of loading configuration globally. This enables better testability and eliminates the need for unsafe global resets.
§Arguments
args- Parsed command-line arguments for the match operationconfig_service- Configuration service providing access to settings
§Returns
Returns Ok(()) on successful completion, or an error if the operation fails.
§Errors
- Configuration loading failures from the service
- AI client initialization failures
- File processing errors
- Network connectivity issues with AI providers