mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-16 02:11:52 +02:00
version 2 of trying to get the module names
This commit is contained in:
@@ -11,13 +11,13 @@ try {
|
|||||||
getFilePath: (file) => {return webUtils.getPathForFile(file)}
|
getFilePath: (file) => {return webUtils.getPathForFile(file)}
|
||||||
})
|
})
|
||||||
contextBridge.exposeInMainWorld("onStartup", {
|
contextBridge.exposeInMainWorld("onStartup", {
|
||||||
getModuleNames: (file) => { ipcRenderer.send("get_modules", "")}
|
getModuleNames: () => ipcRenderer.invoke('get-module-names')
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcRenderer.on("modules", (event, resp) => {
|
// ipcRenderer.on("modules", (event, resp) => {
|
||||||
loadAiOptions(resp.ai_modules);
|
// loadAiOptions(resp.ai_modules);
|
||||||
loadTranscriptionOptions(resp.transcription_modules);
|
// loadTranscriptionOptions(resp.transcription_modules);
|
||||||
})
|
// })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error in preload.js");
|
console.log("Error in preload.js");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,12 +31,14 @@ uploadContainer.addEventListener("drop", (e) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
window.addEventListener('load', async (e) => {
|
||||||
window.addEventListener('load', (e) => {
|
|
||||||
try {
|
try {
|
||||||
console.log("test");
|
console.log("test");
|
||||||
loadLanguageOptions();
|
loadLanguageOptions();
|
||||||
window.onStartup.getModuleNames();
|
const value = await window.onStartup.getModuleNames();
|
||||||
|
loadAiOptions(value.ai_modules);
|
||||||
|
loadTranscriptionOptions(value.transcription_modules);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function checkBoxes() {
|
|||||||
const aiType = document.getElementById("ai_type");
|
const aiType = document.getElementById("ai_type");
|
||||||
const sendingPackage = {
|
const sendingPackage = {
|
||||||
"video": {
|
"video": {
|
||||||
"module":"extraction-video-toaudio",
|
"module":"extraction-video-to-audio",
|
||||||
"inputVideoPath": pathTest,
|
"inputVideoPath": pathTest,
|
||||||
"outputType": outputType.value
|
"outputType": outputType.value
|
||||||
},
|
},
|
||||||
@@ -52,7 +52,7 @@ function checkBoxes() {
|
|||||||
},
|
},
|
||||||
"document": {
|
"document": {
|
||||||
"module":aiType.value,
|
"module":aiType.value,
|
||||||
"style": selectedStyles
|
"styles": selectedStyles
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ipcRenderer.send("file_submit", sendingPackage)
|
ipcRenderer.send("file_submit", sendingPackage)
|
||||||
|
|||||||
Reference in New Issue
Block a user