fix: about dialog, cache paths, keyframes, reprocess always uses low-res
- Replace native macOS About menu with custom Svelte dialog via Tauri event - Inline SVG icon in AboutDialog (fixes broken image in webview) - Align cache directory with Tauri $APPDATA, add to asset protocol scope - Fix ffprobe 8.x keyframe parsing (skip_frame nokey, flexible parser) - Copy caption files into cache dir when outside cache path - Add -y flag to ffmpeg thumbnail extraction (prevent hang on re-extract) - Reprocess always uses preview (low-res) file, never HQ export - Prefer cached preview file for analysis even when HQ is cached - Guard upgrade toast when already on HQ Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -82,12 +82,25 @@ pub async fn save_analysis_to_cache(
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Convert absolute caption path to relative
|
||||
// Convert absolute caption path to relative (copy into cache if needed)
|
||||
let relative_caption = caption_file_path.and_then(|abs| {
|
||||
std::path::Path::new(&abs)
|
||||
.strip_prefix(&cache_dir)
|
||||
.ok()
|
||||
.map(|rel| rel.to_string_lossy().to_string())
|
||||
let abs_path = std::path::Path::new(&abs);
|
||||
// Already inside cache dir
|
||||
if let Ok(rel) = abs_path.strip_prefix(&cache_dir) {
|
||||
return Some(rel.to_string_lossy().to_string());
|
||||
}
|
||||
// Outside cache dir — copy it in
|
||||
if abs_path.is_file() {
|
||||
let captions_dir = cache_dir.join("captions");
|
||||
std::fs::create_dir_all(&captions_dir).ok();
|
||||
if let Some(filename) = abs_path.file_name() {
|
||||
let dest = captions_dir.join(filename);
|
||||
if std::fs::copy(abs_path, &dest).is_ok() {
|
||||
return Some(format!("captions/{}", filename.to_string_lossy()));
|
||||
}
|
||||
}
|
||||
}
|
||||
None
|
||||
});
|
||||
|
||||
let now = format!(
|
||||
|
||||
Reference in New Issue
Block a user