diff --git a/src/core/probe/ffprobe.rs b/src/core/probe/ffprobe.rs index 1ece4d99..ba9f082b 100644 --- a/src/core/probe/ffprobe.rs +++ b/src/core/probe/ffprobe.rs @@ -34,7 +34,10 @@ pub struct FormatInfo { } pub fn probe_video(video_path: &str) -> Result { - let output = Command::new("ffprobe") + // Use FFPROBE_PATH environment variable, fallback to "ffprobe" + let ffprobe_path = std::env::var("FFPROBE_PATH").unwrap_or_else(|_| "ffprobe".to_string()); + + let output = Command::new(&ffprobe_path) .args([ "-v", "quiet", diff --git a/src/main.rs b/src/main.rs index 0dec3b7a..542931de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -165,8 +165,8 @@ async fn handle_register(path: &str) -> Result<()> { anyhow::bail!("File not found: {}", path); } - // 產生 file_uuid (Uuid::new_v4()) - let file_uuid = Uuid::new_v4().simple().to_string(); + // 產生 file_uuid (Uuid::new_v4(),標準格式帶連字號) + let file_uuid = Uuid::new_v4().to_string(); println!("Generated UUID: {}", file_uuid); // ffprobe 提取 metadata