feat(auto-caption): 发布 v0.7.0 版本

This commit is contained in:
himeditator
2025-08-20 00:53:06 +08:00
parent 771f7ad002
commit 34362fea3d
24 changed files with 164 additions and 70 deletions

View File

@@ -61,6 +61,7 @@ class AllConfig {
public readConfig() {
const configPath = path.join(app.getPath('userData'), 'config.json')
if(fs.existsSync(configPath)){
Log.info('Read Config from:', configPath)
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'))
if(config.captionWindowWidth) this.captionWindowWidth = config.captionWindowWidth
if(config.uiLanguage) this.uiLanguage = config.uiLanguage
@@ -69,7 +70,6 @@ class AllConfig {
if(config.leftBarWidth) this.leftBarWidth = config.leftBarWidth
if(config.styles) this.setStyles(config.styles)
if(config.controls) this.setControls(config.controls)
Log.info('Read Config from:', configPath)
}
}

View File

@@ -150,8 +150,7 @@ export class CaptionEngine {
const lines = data.toString().split('\n')
lines.forEach((line: string) => {
if(line.trim()){
controlWindow.sendErrorMessage(/*i18n('engine.error') +*/ line)
console.error(line)
Log.error(line)
}
})
});
@@ -228,6 +227,10 @@ function handleEngineData(data: any) {
else if(data.command === 'info') {
Log.info('Engine Info:', data.content)
}
else if(data.command === 'error') {
Log.error('Engine Error:', data.content)
controlWindow.sendErrorMessage(/*i18n('engine.error') +*/ data.content)
}
else if(data.command === 'usage') {
Log.info('Engine Token Usage: ', data.content)
}