ai tools finished
This commit is contained in:
@ -155,8 +155,12 @@ export const useEditorStore = create<EditorState & EditorActions>()(
|
||||
const { videoPath, words, segments, deletedRanges, cutRanges, muteRanges, gainRanges, globalGainDb, silenceTrimGroups, transcriptionModel, language, exportedAudioPath } = get();
|
||||
if (!videoPath) throw new Error('No video loaded');
|
||||
const now = new Date().toISOString();
|
||||
// Strip globalStartIndex (runtime-only field) before persisting
|
||||
const persistSegments = segments.map(({ globalStartIndex: _drop, ...rest }) => rest);
|
||||
// Strip globalStartIndex (runtime-only field) before persisting.
|
||||
const persistSegments = segments.map((seg) => {
|
||||
const rest = { ...seg };
|
||||
delete (rest as Partial<Segment>).globalStartIndex;
|
||||
return rest;
|
||||
});
|
||||
return {
|
||||
version: 1,
|
||||
videoPath,
|
||||
|
||||
Reference in New Issue
Block a user