Skip to content

Commit

Permalink
fix core auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
Icexbb committed Aug 12, 2023
1 parent 333fadc commit da87a35
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions electron/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,10 @@ ipcMain.on("write-new-core", function (_, args) {
appLog(e);
}
fs.writeFileSync(CORE_PATH, args);
if (app.isPackaged)
if (app.isPackaged) {
app.relaunch();
app.exit();
app.exit(0);
}
});
ipcMain.on("get-task-log", function (event, args) {
event.returnValue = CoreTaskLogs[args];
Expand Down
6 changes: 4 additions & 2 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,10 @@ ipcMain.on("write-new-core", (_, args) => {
appLog(e)
}
fs.writeFileSync(CORE_PATH, args);
if (app.isPackaged) app.relaunch();
app.exit();
if (app.isPackaged) {
app.relaunch();
app.exit(0);
}
})
ipcMain.on("get-task-log", (event, args) => {
event.returnValue = CoreTaskLogs[args]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sekaisubtitle-electron",
"version": "0.9.9-rc.9",
"version": "0.9.9-rc.10",
"main": "dist-electron/main/index.js",
"description": "Sekai Subtitle",
"author": "XBB <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/views/Translate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export default defineComponent({
return e
}
},
updateCharaTranalation() {
updateCharaTranslation() {
ipcRenderer.sendSync("update-name-translation")
let chart = ipcRenderer.sendSync("get-name-translation")
for (let i = 0; i < this.eventData.data.length; i++) {
Expand Down

0 comments on commit da87a35

Please sign in to comment.