mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-16 02:11:52 +02:00
Refactor speaker management and replace functionality; add IPC for saving speaker mappings and update HTML structure
This commit is contained in:
@@ -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":[],
|
||||
|
||||
Reference in New Issue
Block a user