execute

Function execute 

Source
pub async fn execute(
    args: SyncArgs,
    config_service: &dyn ConfigService,
) -> Result<()>
Expand description

Execute the sync command with the provided arguments.

This function handles both manual offset synchronization and automatic synchronization using various detection methods.

§Arguments

  • args - The sync command arguments containing input files and options
  • config_service - Service for accessing configuration settings

§Returns

Returns Ok(()) on successful synchronization, or an error if the operation fails

§Errors

This function returns an error if:

  • Arguments validation fails
  • Subtitle file cannot be loaded
  • Video file is required but not provided for automatic sync
  • Output file already exists and force flag is not set
  • Synchronization detection fails

Execute the sync command with the provided arguments.

Handles both single and batch synchronization modes.