Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(delete): keep a project's recordings while another project file does not parse
Marc Diaz19890d7fdfae
diff --git a/electron/ai-edition/document-service.ts b/electron/ai-edition/document-service.tsindex dfabb1ef7..178947a39 100644--- a/electron/ai-edition/document-service.ts+++ b/electron/ai-edition/document-service.ts@@ -386,11 +386,20 @@ export class DocumentService {/** Every project that parses, unrelinked and unannounced: a listing, not an open. */async readAllProjects(): Promise<AxcutDocument[]> {+ return (await this.readAllProjectsReport()).documents;+ }++ /**+ * `readAllProjects`, plus the project files it skipped. A caller deciding whether no project+ * uses a file needs those: a project that does not parse may still be using it.+ */+ async readAllProjectsReport(): Promise<{ documents: AxcutDocument[]; unreadable: string[] }> {await this.ensureProjectsDir();const entries = await fs.readdir(this.projectsRoot);// ensureProjectsDir (above) already migrated any legacy `.axcut` files.const projectFiles = entries.filter((name) => name.endsWith(PROJECT_FILE_EXTENSION));const documents: AxcutDocument[] = [];+ const unreadable: string[] = [];for (const name of projectFiles) {const filePath = path.join(this.projectsRoot, name);try {@@ -399,9 +408,10 @@ export class DocumentService {// ponytail: skip unreadable files rather than failing the whole list.// A future migration pass can recover them.console.warn(`[ai-edition] failed to read ${filePath}:`, error);+ unreadable.push(filePath);}}- return documents;+ return { documents, unreadable };}/**diff --git a/electron/ai-edition/project-recordings.test.ts b/electron/ai-edition/project-recordings.test.tsindex 3ec7a884c..06c55e2f0 100644--- a/electron/ai-edition/project-recordings.test.ts+++ b/electron/ai-edition/project-recordings.test.ts@@ -50,9 +50,11 @@ describe("project recordings", () => {await touch(path.join(recordingsDir, "recording-123.mp4"));const id = await projectWith("Mine", video);- const { owned, keptFor } = await findProjectRecordings(id, await documents.readAllProjects(), [- recordingsDir,- ]);+ const { owned, keptFor } = await findProjectRecordings(+ id,+ await documents.readAllProjectsReport(),+ [recordingsDir],+ );expect(owned).toHaveLength(1);expect(owned[0].files.sort()).toEqual([video, ...companions].sort());@@ -66,19 +68,52 @@ describe("project recordings", () => {const id = await projectWith("Mine", shared, own);await projectWith("Demo v2", shared);- const { owned, keptFor } = await findProjectRecordings(id, await documents.readAllProjects(), [- recordingsDir,- ]);+ const { owned, keptFor } = await findProjectRecordings(+ id,+ await documents.readAllProjectsReport(),+ [recordingsDir],+ );expect(owned.map((set) => set.stem)).toEqual(["recording-2"]);expect(keptFor).toEqual(["Demo v2"]);});+ it("keeps every recording while a project file does not parse", async () => {+ const video = await touch(path.join(recordingsDir, "recording-9.mp4"));+ const id = await projectWith("Mine", video);+ // Could be a project using recording-9: a newer schema, or a save cut short.+ await touch(path.join(root, "projects", "broken.openscreen"), "{ not json");++ const { owned, keptFor, unreadable } = await findProjectRecordings(+ id,+ await documents.readAllProjectsReport(),+ [recordingsDir],+ );++ expect(owned).toEqual([]);+ expect(keptFor).toEqual([]);+ expect(unreadable).toBe(1);+ });++ it("reports no unreadable projects when it has no recordings to keep", async () => {+ const imported = await touch(path.join(elsewhere, "clip.mp4"));+ const id = await projectWith("Imported", imported);+ await touch(path.join(root, "projects", "broken.openscreen"), "{ not json");++ const { unreadable } = await findProjectRecordings(+ id,+ await documents.readAllProjectsReport(),+ [recordingsDir],+ );++ expect(unreadable).toBe(0);+ });+it("never owns a video outside the recordings folders", async () => {const imported = await touch(path.join(elsewhere, "recording-5.mp4"));const id = await projectWith("Imported", imported);- const { owned } = await findProjectRecordings(id, await documents.readAllProjects(), [+ const { owned } = await findProjectRecordings(id, await documents.readAllProjectsReport(), [recordingsDir,]);@@ -89,7 +124,7 @@ describe("project recordings", () => {const video = await touch(path.join(recordingsDir, "recording-7.mp4"));const cursor = await touch(`${video}.cursor.json`);const id = await projectWith("Mine", video);- const { owned } = await findProjectRecordings(id, await documents.readAllProjects(), [+ const { owned } = await findProjectRecordings(id, await documents.readAllProjectsReport(), [recordingsDir,]);diff --git a/electron/ai-edition/project-recordings.ts b/electron/ai-edition/project-recordings.tsindex 6fcedb186..122c7348a 100644--- a/electron/ai-edition/project-recordings.ts+++ b/electron/ai-edition/project-recordings.ts@@ -16,6 +16,11 @@ export interface ProjectRecordings {owned: RecordingSet[];/** Titles of the other projects that use some of this project's recordings. */keptFor: string[];+ /**+ * Project files that did not parse. Any of them may use these recordings, so while there+ * are some the project owns none: its recordings are all kept.+ */+ unreadable: number;}export type RecordingsDisposal = "keep" | "trash" | "permanent";@@ -83,13 +88,17 @@ async function readRecordingSet(key: string): Promise<RecordingSet | null> {*/export async function findProjectRecordings(projectId: string,- documents: readonly AxcutDocument[],+ projects: { documents: readonly AxcutDocument[]; unreadable: readonly string[] },recordingsDirs: readonly string[],): Promise<ProjectRecordings> {+ const { documents } = projects;const target = documents.find((doc) => doc.project.id === projectId);- if (!target) return { owned: [], keptFor: [] };+ if (!target) return { owned: [], keptFor: [], unreadable: 0 };const keys = documentRecordingKeys(target, recordingsDirs);+ if (keys.size > 0 && projects.unreadable.length > 0) {+ return { owned: [], keptFor: [], unreadable: projects.unreadable.length };+ }const keptFor = new Set<string>();for (const doc of documents) {if (doc.project.id === projectId) continue;@@ -107,7 +116,7 @@ export async function findProjectRecordings(const set = await readRecordingSet(key);if (set) owned.push(set);}- return { owned, keptFor: [...keptFor] };+ return { owned, keptFor: [...keptFor], unreadable: 0 };}/** Throws on the first file that cannot be removed, so a failed trash can be retried permanently. */diff --git a/electron/native-bridge/services/aiEditionService.deleteRecordings.test.ts b/electron/native-bridge/services/aiEditionService.deleteRecordings.test.tsindex 44110bbf9..28acd0026 100644--- a/electron/native-bridge/services/aiEditionService.deleteRecordings.test.ts+++ b/electron/native-bridge/services/aiEditionService.deleteRecordings.test.ts@@ -57,6 +57,7 @@ describe("AiEditionService — deleting a project's recordings", () => {count: 1,sizeBytes: 5 + 2,keptFor: [],+ unreadable: 0,});});@@ -78,6 +79,17 @@ describe("AiEditionService — deleting a project's recordings", () => {).toBeNull();});+ it("deletes nothing when a project file stopped parsing after the dialog asked", async () => {+ await fs.writeFile(path.join(root, "projects", "broken.openscreen"), "{ not json");++ await expect(service().deleteProject(projectId, "trash")).resolves.toMatchObject({+ success: false,+ });+ expect(trashItem).not.toHaveBeenCalled();+ await expect(fs.access(video)).resolves.toBeUndefined();+ await expect(documents.getProject(projectId)).resolves.toBeDefined();+ });+it("keeps everything when the Trash refuses, then deletes permanently on request", async () => {trashItem.mockRejectedValueOnce(new Error("no trash on this filesystem"));diff --git a/electron/native-bridge/services/aiEditionService.ts b/electron/native-bridge/services/aiEditionService.tsindex 20e2f6b69..7692df620 100644--- a/electron/native-bridge/services/aiEditionService.ts+++ b/electron/native-bridge/services/aiEditionService.ts@@ -159,11 +159,11 @@ export class AiEditionService {async projectRecordings(projectId: string): Promise<AiEditionProjectRecordingsResult> {const recordings = this.options.recordings;- if (!recordings) return { success: true, count: 0, sizeBytes: 0, keptFor: [] };+ if (!recordings) return { success: true, count: 0, sizeBytes: 0, keptFor: [], unreadable: 0 };try {- const { owned, keptFor } = await findProjectRecordings(+ const { owned, keptFor, unreadable } = await findProjectRecordings(projectId,- await this.options.documents.readAllProjects(),+ await this.options.documents.readAllProjectsReport(),recordings.dirs(),);return {@@ -171,6 +171,7 @@ export class AiEditionService {count: owned.length,sizeBytes: owned.reduce((sum, set) => sum + set.sizeBytes, 0),keptFor,+ unreadable,};} catch (error) {return {@@ -178,6 +179,7 @@ export class AiEditionService {count: 0,sizeBytes: 0,keptFor: [],+ unreadable: 0,error: error instanceof Error ? error.message : String(error),};}@@ -192,11 +194,19 @@ export class AiEditionService {// the user can retry, instead of leaving takes that nothing points at any more.if (disposal !== "keep" && recordings) {try {- const { owned } = await findProjectRecordings(+ const { owned, unreadable } = await findProjectRecordings(projectId,- await this.options.documents.readAllProjects(),+ await this.options.documents.readAllProjectsReport(),recordings.dirs(),);+ // A project file broke since the dialog asked: deleting the project alone would+ // quietly drop the recordings the user chose to remove, so delete nothing.+ if (unreadable > 0) {+ return {+ success: false,+ error: `${unreadable} project file(s) could not be read, so recordings they may use were not deleted`,+ };+ }await removeRecordingSets(owned, disposal, recordings.trashItem);await forgetMediaLinks(recordings.registryDir(),diff --git a/src/components/ai-edition/Modals.tsx b/src/components/ai-edition/Modals.tsxindex 10846c192..41cd79d98 100644--- a/src/components/ai-edition/Modals.tsx+++ b/src/components/ai-edition/Modals.tsx@@ -365,6 +365,17 @@ export function OpenProjectModal({})}</div>) : null}+ {!trashFailed && recordings && recordings.unreadable > 0 ? (+ <div+ style={{+ font: "400 12px/1.4 var(--font-body)",+ color: "var(--muted)",+ marginTop: 4,+ }}+ >+ {t("openProjectDialog.recordingsKeptUnreadable")}+ </div>+ ) : null}</div><buttontype="button"diff --git a/src/components/ai-edition/OpenProjectModal.test.tsx b/src/components/ai-edition/OpenProjectModal.test.tsxindex cbc576b3d..f9717ab2f 100644--- a/src/components/ai-edition/OpenProjectModal.test.tsx+++ b/src/components/ai-edition/OpenProjectModal.test.tsx@@ -25,6 +25,7 @@ const noRecordings: AiEditionProjectRecordingsResult = {count: 0,sizeBytes: 0,keptFor: [],+ unreadable: 0,};function renderModal(@@ -57,6 +58,7 @@ const ownRecordings: AiEditionProjectRecordingsResult = {count: 2,sizeBytes: 24 * 1024 * 1024,keptFor: [],+ unreadable: 0,};describe("OpenProjectModal delete", () => {@@ -118,6 +120,17 @@ describe("OpenProjectModal delete", () => {expect(await screen.findByText(/used by Demo v2 are kept/i)).toBeInTheDocument();});+ it("offers no Trash and says why when a project file could not be read", async () => {+ const { onDelete } = renderModal({ recordings: { ...noRecordings, unreadable: 1 } });++ fireEvent.click(screen.getAllByRole("button", { name: /delete project/i })[0]);++ expect(await screen.findByText(/couldn't be read/i)).toBeInTheDocument();+ expect(screen.queryByRole("button", { name: /move its recordings/i })).not.toBeInTheDocument();+ fireEvent.click(screen.getByRole("button", { name: /^delete$/i }));+ await waitFor(() => expect(onDelete).toHaveBeenCalledWith("proj_one", "keep"));+ });+it("asks to delete permanently when the Trash refuses", async () => {const { onDelete } = renderModal({recordings: ownRecordings,diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.jsonindex de4aa282f..d16173daa 100644--- a/src/i18n/locales/ar/editor.json+++ b/src/i18n/locales/ar/editor.json@@ -351,6 +351,7 @@"alsoTrash": "نقل تسجيلاته أيضًا إلى سلة المهملات ({{size}})","alsoRecycle": "نقل تسجيلاته أيضًا إلى سلة المحذوفات ({{size}})","recordingsKeptFor": "يتم الاحتفاظ بالتسجيلات التي يستخدمها {{projects}}.",+ "recordingsKeptUnreadable": "تعذّرت قراءة بعض المشاريع، لذا يتم الاحتفاظ بتسجيلات هذا المشروع.","trashFailed": "تعذّر نقل التسجيلات إلى سلة المهملات. هل تريد حذفها نهائيًا؟","recycleFailed": "تعذّر نقل التسجيلات إلى سلة المحذوفات. هل تريد حذفها نهائيًا؟","deletePermanently": "حذف نهائي"diff --git a/src/i18n/locales/cs/editor.json b/src/i18n/locales/cs/editor.jsonindex 40dd022bb..028ba85b6 100644--- a/src/i18n/locales/cs/editor.json+++ b/src/i18n/locales/cs/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Přesunout také jeho nahrávky do koše ({{size}})","alsoRecycle": "Přesunout také jeho nahrávky do koše ({{size}})","recordingsKeptFor": "Nahrávky používané projektem {{projects}} zůstanou zachovány.",+ "recordingsKeptUnreadable": "Některé projekty nešlo přečíst, proto nahrávky tohoto projektu zůstanou zachovány.","trashFailed": "Nahrávky se nepodařilo přesunout do koše. Smazat je trvale?","recycleFailed": "Nahrávky se nepodařilo přesunout do koše. Smazat je trvale?","deletePermanently": "Smazat trvale"diff --git a/src/i18n/locales/de/editor.json b/src/i18n/locales/de/editor.jsonindex 3a88dcc8b..cafce650b 100644--- a/src/i18n/locales/de/editor.json+++ b/src/i18n/locales/de/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Auch die Aufnahmen in den Papierkorb legen ({{size}})","alsoRecycle": "Auch die Aufnahmen in den Papierkorb verschieben ({{size}})","recordingsKeptFor": "Aufnahmen, die {{projects}} verwendet, bleiben erhalten.",+ "recordingsKeptUnreadable": "Einige Projekte konnten nicht gelesen werden, daher bleiben die Aufnahmen dieses Projekts erhalten.","trashFailed": "Die Aufnahmen konnten nicht in den Papierkorb gelegt werden. Endgültig löschen?","recycleFailed": "Die Aufnahmen konnten nicht in den Papierkorb verschoben werden. Endgültig löschen?","deletePermanently": "Endgültig löschen"diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.jsonindex 4944dcccf..b026cec8e 100644--- a/src/i18n/locales/en/editor.json+++ b/src/i18n/locales/en/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Also move its recordings to the Trash ({{size}})","alsoRecycle": "Also move its recordings to the Recycle Bin ({{size}})","recordingsKeptFor": "Recordings used by {{projects}} are kept.",+ "recordingsKeptUnreadable": "Some projects couldn't be read, so this project's recordings are kept.","trashFailed": "Couldn't move the recordings to the Trash. Delete them permanently?","recycleFailed": "Couldn't move the recordings to the Recycle Bin. Delete them permanently?","deletePermanently": "Delete permanently"diff --git a/src/i18n/locales/es/editor.json b/src/i18n/locales/es/editor.jsonindex 4dddbad0b..cd6b4ce4c 100644--- a/src/i18n/locales/es/editor.json+++ b/src/i18n/locales/es/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Mover también sus grabaciones a la Papelera ({{size}})","alsoRecycle": "Mover también sus grabaciones a la Papelera de reciclaje ({{size}})","recordingsKeptFor": "Se conservan las grabaciones que usa {{projects}}.",+ "recordingsKeptUnreadable": "No se pudieron leer algunos proyectos, así que se conservan las grabaciones de este proyecto.","trashFailed": "No se pudieron mover las grabaciones a la Papelera. ¿Eliminarlas definitivamente?","recycleFailed": "No se pudieron mover las grabaciones a la Papelera de reciclaje. ¿Eliminarlas definitivamente?","deletePermanently": "Eliminar definitivamente"diff --git a/src/i18n/locales/fr/editor.json b/src/i18n/locales/fr/editor.jsonindex d06dd8154..50b8eab29 100644--- a/src/i18n/locales/fr/editor.json+++ b/src/i18n/locales/fr/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Placer aussi ses enregistrements dans la Corbeille ({{size}})","alsoRecycle": "Placer aussi ses enregistrements dans la Corbeille ({{size}})","recordingsKeptFor": "Les enregistrements utilisés par {{projects}} sont conservés.",+ "recordingsKeptUnreadable": "Certains projets n'ont pas pu être lus : les enregistrements de ce projet sont donc conservés.","trashFailed": "Impossible de placer les enregistrements dans la Corbeille. Les supprimer définitivement ?","recycleFailed": "Impossible de placer les enregistrements dans la Corbeille. Les supprimer définitivement ?","deletePermanently": "Supprimer définitivement"diff --git a/src/i18n/locales/it/editor.json b/src/i18n/locales/it/editor.jsonindex 79977a9fb..23b3ef350 100644--- a/src/i18n/locales/it/editor.json+++ b/src/i18n/locales/it/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Sposta anche le registrazioni nel Cestino ({{size}})","alsoRecycle": "Sposta anche le registrazioni nel Cestino ({{size}})","recordingsKeptFor": "Le registrazioni usate da {{projects}} vengono mantenute.",+ "recordingsKeptUnreadable": "Non è stato possibile leggere alcuni progetti, quindi le registrazioni di questo progetto vengono mantenute.","trashFailed": "Impossibile spostare le registrazioni nel Cestino. Eliminarle definitivamente?","recycleFailed": "Impossibile spostare le registrazioni nel Cestino. Eliminarle definitivamente?","deletePermanently": "Elimina definitivamente"diff --git a/src/i18n/locales/ja-JP/editor.json b/src/i18n/locales/ja-JP/editor.jsonindex fc033cccd..354fd0e2a 100644--- a/src/i18n/locales/ja-JP/editor.json+++ b/src/i18n/locales/ja-JP/editor.json@@ -351,6 +351,7 @@"alsoTrash": "録画もゴミ箱に移動する({{size}})","alsoRecycle": "録画もごみ箱に移動する({{size}})","recordingsKeptFor": "{{projects}} で使われている録画は残ります。",+ "recordingsKeptUnreadable": "読み込めないプロジェクトがあるため、このプロジェクトの録画は保持されます。","trashFailed": "録画をゴミ箱に移動できませんでした。完全に削除しますか?","recycleFailed": "録画をごみ箱に移動できませんでした。完全に削除しますか?","deletePermanently": "完全に削除"diff --git a/src/i18n/locales/ko-KR/editor.json b/src/i18n/locales/ko-KR/editor.jsonindex 929b122f3..c23df76fc 100644--- a/src/i18n/locales/ko-KR/editor.json+++ b/src/i18n/locales/ko-KR/editor.json@@ -351,6 +351,7 @@"alsoTrash": "녹화 파일도 휴지통으로 이동 ({{size}})","alsoRecycle": "녹화 파일도 휴지통으로 이동 ({{size}})","recordingsKeptFor": "{{projects}}에서 사용 중인 녹화 파일은 유지됩니다.",+ "recordingsKeptUnreadable": "일부 프로젝트를 읽을 수 없어 이 프로젝트의 녹화 파일은 유지됩니다.","trashFailed": "녹화 파일을 휴지통으로 이동하지 못했습니다. 영구적으로 삭제할까요?","recycleFailed": "녹화 파일을 휴지통으로 이동하지 못했습니다. 영구적으로 삭제할까요?","deletePermanently": "영구 삭제"diff --git a/src/i18n/locales/pt-BR/editor.json b/src/i18n/locales/pt-BR/editor.jsonindex 445c58538..3314db51b 100644--- a/src/i18n/locales/pt-BR/editor.json+++ b/src/i18n/locales/pt-BR/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Mover também as gravações para a Lixeira ({{size}})","alsoRecycle": "Mover também as gravações para a Lixeira ({{size}})","recordingsKeptFor": "As gravações usadas por {{projects}} são mantidas.",+ "recordingsKeptUnreadable": "Não foi possível ler alguns projetos, então as gravações deste projeto são mantidas.","trashFailed": "Não foi possível mover as gravações para a Lixeira. Excluí-las permanentemente?","recycleFailed": "Não foi possível mover as gravações para a Lixeira. Excluí-las permanentemente?","deletePermanently": "Excluir permanentemente"diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.jsonindex 921b984fb..3d9063285 100644--- a/src/i18n/locales/ru/editor.json+++ b/src/i18n/locales/ru/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Также переместить его записи в Корзину ({{size}})","alsoRecycle": "Также переместить его записи в Корзину ({{size}})","recordingsKeptFor": "Записи, используемые в {{projects}}, сохраняются.",+ "recordingsKeptUnreadable": "Некоторые проекты не удалось прочитать, поэтому записи этого проекта сохраняются.","trashFailed": "Не удалось переместить записи в Корзину. Удалить их безвозвратно?","recycleFailed": "Не удалось переместить записи в Корзину. Удалить их безвозвратно?","deletePermanently": "Удалить безвозвратно"diff --git a/src/i18n/locales/tr/editor.json b/src/i18n/locales/tr/editor.jsonindex b9cdf815e..c43790b57 100644--- a/src/i18n/locales/tr/editor.json+++ b/src/i18n/locales/tr/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Kayıtlarını da Çöp Sepeti'ne taşı ({{size}})","alsoRecycle": "Kayıtlarını da Geri Dönüşüm Kutusu'na taşı ({{size}})","recordingsKeptFor": "{{projects}} tarafından kullanılan kayıtlar korunur.",+ "recordingsKeptUnreadable": "Bazı projeler okunamadı, bu yüzden bu projenin kayıtları saklanıyor.","trashFailed": "Kayıtlar Çöp Sepeti'ne taşınamadı. Kalıcı olarak silinsin mi?","recycleFailed": "Kayıtlar Geri Dönüşüm Kutusu'na taşınamadı. Kalıcı olarak silinsin mi?","deletePermanently": "Kalıcı olarak sil"diff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.jsonindex d3fb571a6..c3be4719e 100644--- a/src/i18n/locales/vi/editor.json+++ b/src/i18n/locales/vi/editor.json@@ -351,6 +351,7 @@"alsoTrash": "Đồng thời chuyển các bản ghi của dự án vào Thùng rác ({{size}})","alsoRecycle": "Đồng thời chuyển các bản ghi của dự án vào Thùng rác ({{size}})","recordingsKeptFor": "Các bản ghi được {{projects}} sử dụng sẽ được giữ lại.",+ "recordingsKeptUnreadable": "Không thể đọc một số dự án, vì vậy các bản ghi của dự án này được giữ lại.","trashFailed": "Không thể chuyển các bản ghi vào Thùng rác. Xóa vĩnh viễn?","recycleFailed": "Không thể chuyển các bản ghi vào Thùng rác. Xóa vĩnh viễn?","deletePermanently": "Xóa vĩnh viễn"diff --git a/src/i18n/locales/zh-CN/editor.json b/src/i18n/locales/zh-CN/editor.jsonindex 400710408..eb03ff802 100644--- a/src/i18n/locales/zh-CN/editor.json+++ b/src/i18n/locales/zh-CN/editor.json@@ -351,6 +351,7 @@"alsoTrash": "同时将其录制文件移到废纸篓({{size}})","alsoRecycle": "同时将其录制文件移到回收站({{size}})","recordingsKeptFor": "{{projects}} 使用的录制文件会保留。",+ "recordingsKeptUnreadable": "部分项目无法读取,因此会保留此项目的录制文件。","trashFailed": "无法将录制文件移到废纸篓。要永久删除吗?","recycleFailed": "无法将录制文件移到回收站。要永久删除吗?","deletePermanently": "永久删除"diff --git a/src/i18n/locales/zh-TW/editor.json b/src/i18n/locales/zh-TW/editor.jsonindex 020a5f080..f9c7a1378 100644--- a/src/i18n/locales/zh-TW/editor.json+++ b/src/i18n/locales/zh-TW/editor.json@@ -351,6 +351,7 @@"alsoTrash": "同時將其錄製檔案移到垃圾桶({{size}})","alsoRecycle": "同時將其錄製檔案移到資源回收筒({{size}})","recordingsKeptFor": "{{projects}} 使用的錄製檔案會保留。",+ "recordingsKeptUnreadable": "部分專案無法讀取,因此會保留此專案的錄製檔案。","trashFailed": "無法將錄製檔案移到垃圾桶。要永久刪除嗎?","recycleFailed": "無法將錄製檔案移到資源回收筒。要永久刪除嗎?","deletePermanently": "永久刪除"diff --git a/src/native/browserShim.ts b/src/native/browserShim.tsindex dda3fc007..7643f3296 100644--- a/src/native/browserShim.ts+++ b/src/native/browserShim.ts@@ -550,7 +550,7 @@ function createShimBridgeClient() {return Promise.resolve({ success: true });},recordings: (_projectId: string) =>- Promise.resolve({ success: true, count: 0, sizeBytes: 0, keptFor: [] }),+ Promise.resolve({ success: true, count: 0, sizeBytes: 0, keptFor: [], unreadable: 0 }),addAsset: (projectId: string, path: string, label?: string, kind?: "video" | "audio") => {const doc = documentsByProject[projectId];if (!doc) return Promise.resolve({ assetId: "", document: null });diff --git a/src/native/contracts.ts b/src/native/contracts.tsindex bb3c27924..ac900508b 100644--- a/src/native/contracts.ts+++ b/src/native/contracts.ts@@ -297,6 +297,8 @@ export interface AiEditionProjectRecordingsResult {sizeBytes: number;/** Titles of the other projects that keep some of this project's recordings in use. */keptFor: string[];+ /** Project files that did not parse. While there are some, every recording is kept. */+ unreadable: number;error?: string;}