Enhance configuration handling and implement wizard completion logic
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-11 17:15:54 +11:00
parent e48a061ca0
commit c577d354e7
5 changed files with 69 additions and 2 deletions
+4
View File
@@ -761,6 +761,10 @@ func saveWizard(request RequestStruct) (nextStep int, err error) {
}
if nextStep == 10 {
Settings.WizardCompleted = true
}
err = saveSettings(Settings)
if err != nil {
return
+1
View File
@@ -302,6 +302,7 @@ type SettingsStruct struct {
Version string `json:"version"`
XepgReplaceMissingImages bool `json:"xepg.replace.missing.images"`
XteveAutoUpdate bool `json:"xteveAutoUpdate"`
WizardCompleted bool `json:"wizard.completed"`
}
// LanguageUI : Sprache für das WebUI
+3
View File
@@ -97,6 +97,8 @@ func loadSettings() (settings SettingsStruct, err error) {
return
}
var freshInstall = len(settingsMap) == 0
// Deafult Werte setzten
var defaults = make(map[string]any)
var dataMap = make(map[string]any)
@@ -150,6 +152,7 @@ func loadSettings() (settings SettingsStruct, err error) {
defaults["udpxy"] = ""
defaults["version"] = System.DBVersion
defaults["xteveAutoUpdate"] = true
defaults["wizard.completed"] = !freshInstall
var defaultTempPath = System.Folder.Temp
if len(os.Getenv("XTEVE_CONFIG")) > 0 {
defaultTempPath = System.Folder.Config + "tmp" + string(os.PathSeparator)
+1 -1
View File
@@ -637,7 +637,7 @@ func Web(w http.ResponseWriter, r *http.Request) {
if System.ScanInProgress == 0 {
if len(Settings.Files.M3U) == 0 && len(Settings.Files.HDHR) == 0 {
if Settings.WizardCompleted == false && len(Settings.Files.M3U) == 0 && len(Settings.Files.HDHR) == 0 {
System.ConfigurationWizard = true
}