fix: file_uuid format + ffprobe path

**Fixes**:
1. file_uuid: Use standard format with hyphens (consistent with other 11 places)
   - Changed from simple().to_string() to to_string()
   - Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

2. ffprobe: Use FFPROBE_PATH environment variable
   - Fallback to 'ffprobe' in PATH
   - Follows project convention (DATABASE_URL, AUDIT_ENCRYPTION_KEY)
   - Solves non-interactive PATH issue

**Rationale**:
- Both are one-line changes
- Reduces packaging cycles (avoiding 4th binary sync issue)
- Critical for data consistency and deployment automation
This commit is contained in:
Accusys
2026-10-05 04:13:19 +08:00
parent 948b0f653b
commit 76c52f12fc
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -34,7 +34,10 @@ pub struct FormatInfo {
}
pub fn probe_video(video_path: &str) -> Result<ProbeResult> {
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",
+2 -2
View File
@@ -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