Refactor speaker management and replace functionality; add IPC for saving speaker mappings and update HTML structure

This commit is contained in:
MikeHughes-BIN
2026-01-10 15:03:35 +01:00
parent 3839feac19
commit 56d17de4a5
7 changed files with 137 additions and 157 deletions
+16
View File
@@ -103,7 +103,23 @@ electron.ipcMain.handle('get-module-names', async () => {
return module_array
});
electron.ipcMain.on("save-speaker-mapping", (event, data) => {
const filePath = "/Users/mikehughes/PROJ/video2document/storage/speakerMapping/speakerMapping.json";
const payload = {
speakerId: data.speakerId,
speakerName: data.speakerName,
updated: new Date().toISOString()
};
try {
fs.writeFileSync(filePath, JSON.stringify(payload, null, 2), "utf8");
console.log("Speaker mapping saved!");
} catch (error) {
console.error("Failed to save speaker mapping", error);
}
});
// electron.ipcMain.on("get_modules", async (event, args) => {
// let module_array = {
// "ai_modules":[],