Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(tauri): wait for recording finalization before cap import

Richie McIlroyaded249d4629
diff --git a/apps/desktop/src-tauri/src/import.rs b/apps/desktop/src-tauri/src/import.rs
index 2a1f4390b..1cb13bc49 100644
--- a/apps/desktop/src-tauri/src/import.rs
+++ b/apps/desktop/src-tauri/src/import.rs
@@ -321,6 +321,7 @@ fn full_timeline_for_segments(
timescale: 1.0,
start: 0.0,
end: duration,
+ name: None,
})
})
.collect()
@@ -353,6 +354,7 @@ fn full_timeline_for_source_segments(
timescale: 1.0,
start: 0.0,
end: duration,
+ name: None,
})
})
.collect()
@@ -904,6 +906,7 @@ fn source_timeline_segments_for_import(
},
start,
end,
+ name: None,
});
}
@@ -1700,6 +1703,7 @@ async fn append_mp4_to_editor_project(
timescale: 1.0,
start: 0.0,
end: duration,
+ name: None,
});
add_clip_configs(
&mut config,
@@ -1829,6 +1833,7 @@ async fn append_cap_project_to_editor_project(
timescale: source_segment.timescale,
start: source_segment.start,
end: source_segment.end,
+ name: None,
});
}
}
@@ -1861,6 +1866,7 @@ pub async fn add_existing_recording_to_editor(
let imported_count = if is_mp4_import_path(&source_path) {
append_mp4_to_editor_project(app, target_project_path, source_path).await?
} else if is_cap_project_path(&source_path) {
+ crate::wait_for_recording_ready(&app, &source_path).await?;
append_cap_project_to_editor_project(app, target_project_path, source_path).await?
} else {
return Err("Select an MP4 file or a Cap project folder".to_string());