Split some settings into new "messages" section

Most email dependant sections now depend on this. Also renamed more
email things.
This commit is contained in:
Harvey Tindall
2021-05-07 21:53:29 +01:00
parent 51f2f4cc6a
commit ea0293bd4e
21 changed files with 289 additions and 219 deletions
+7 -1
View File
@@ -199,6 +199,12 @@ func start(asDaemon, firstCall bool) {
if err := app.loadConfig(); err != nil {
app.err.Fatalf("Failed to load config file \"%s\": %v", app.configPath, err)
}
// Some message settings have been moved from "email" to "messages", this will switch them.
if app.config.Section("email").Key("use_24h").Value() != "" {
app.migrateEmailConfig()
}
app.version = app.config.Section("jellyfin").Key("version").String()
// read from config...
debugMode = app.config.Section("ui").Key("debug").MustBool(false)
@@ -548,7 +554,7 @@ func start(asDaemon, firstCall bool) {
go app.checkForUpdates()
}
if app.config.Section("telegram").Key("enabled").MustBool(false) {
if telegramEnabled {
app.telegram, err = newTelegramDaemon(app)
if err != nil {
app.err.Printf("Failed to authenticate with Telegram: %v", err)