add migration for transcription.language to general.language
This commit is contained in:
@@ -78,6 +78,7 @@ func Load() (*Config, error) {
|
||||
|
||||
config.applyLLMDefaults()
|
||||
config.applyThreadsDefault()
|
||||
config.migrateLanguageToGeneral()
|
||||
|
||||
log.Printf("Config: configuration loaded successfully")
|
||||
return &config, nil
|
||||
@@ -132,6 +133,14 @@ func (c *Config) applyLLMDefaults() {
|
||||
}
|
||||
}
|
||||
|
||||
// migrateLanguageToGeneral migrates old transcription.language to general.language
|
||||
func (c *Config) migrateLanguageToGeneral() {
|
||||
if c.Transcription.Language != "" && c.General.Language == "" {
|
||||
c.General.Language = c.Transcription.Language
|
||||
log.Printf("Config: migrated language setting to [general] section")
|
||||
}
|
||||
}
|
||||
|
||||
// migrateInjectionMode converts old mode field to new backends array
|
||||
func (c *Config) migrateInjectionMode(mode string) {
|
||||
switch mode {
|
||||
|
||||
Reference in New Issue
Block a user