db: move legacy data loading out of main/config

put it in loadLegacyData in migrations, which is only called by
migrateToBadger.
This commit is contained in:
Harvey Tindall
2023-06-25 20:15:15 +01:00
parent 28c3d9d2e4
commit ea0598e507
3 changed files with 49 additions and 71 deletions
-9
View File
@@ -157,15 +157,6 @@ func (app *appContext) loadConfig() error {
app.MustSetValue("updates", "channel", releaseChannel)
}
app.storage.customEmails_path = app.config.Section("files").Key("custom_emails").String()
app.storage.loadCustomEmails()
app.MustSetValue("user_page", "enabled", "true")
if app.config.Section("user_page").Key("enabled").MustBool(false) {
app.storage.userPage_path = app.config.Section("files").Key("custom_user_page_content").String()
app.storage.loadUserPageContent()
}
substituteStrings = app.config.Section("jellyfin").Key("substitute_jellyfin_strings").MustString("")
if substituteStrings != "" {