use anyhow::Result;
use serde_json::json;
use std::path::PathBuf;

async fn test_chunk_storage() -> Result<()> {
    // Load ASR result
    let asr_json = std::fs::read_to_string("/Users/accusys/momentry/output/job_16_asr_1774689915907.json")?;
    let asr_result: serde_json::Value = serde_json::from_str(&asr_json)?;
    
    println!("ASR result loaded: {} segments", asr_result["segments"].as_array().unwrap().len());
    
    // Load CUT result  
    let cut_json = std::fs::read_to_string("/Users/accusys/momentry/output/job_16_cut_1774689915910.json")?;
    let cut_result: serde_json::Value = serde_json::from_str(&cut_json)?;
    
    println!("CUT result loaded: {} scenes", cut_result["scenes"].as_array().unwrap().len());
    
    // Check video in database
    println!("\nVideo UUID: 384b0ff44aaaa1f1");
    println!("Video should have FPS: 59.94");
    
    Ok(())
}

fn main() -> Result<()> {
    tokio::runtime::Runtime::new()?.block_on(test_chunk_storage())
}
