fix parse room env.

This commit is contained in:
Miroslav Šedivý
2025-05-29 11:53:40 +02:00
parent 4232861d90
commit d09e48756c
2 changed files with 4 additions and 12 deletions
+2 -6
View File
@@ -122,13 +122,9 @@ func (settings *RoomSettings) fromEnvV2(envs []string) error {
case "NEKO_PASSWORD_ADMIN":
settings.AdminPass = val
case "NEKO_CONTROL_PROTECTION":
if ok, _ := strconv.ParseBool(val); ok {
settings.ControlProtection = true
}
settings.ControlProtection, err = strconv.ParseBool(val)
case "NEKO_IMPLICIT_CONTROL":
if ok, _ := strconv.ParseBool(val); ok {
settings.ImplicitControl = true
}
settings.ImplicitControl, err = strconv.ParseBool(val)
case "NEKO_SCREEN":
settings.Screen = val
case "NEKO_MAX_FPS":
+2 -6
View File
@@ -133,13 +133,9 @@ func (settings *RoomSettings) fromEnvV3(envs []string) error {
case "NEKO_MEMBER_MULTIUSER_ADMIN_PASSWORD":
settings.AdminPass = val
case "NEKO_SESSION_CONTROL_PROTECTION":
if ok, _ := strconv.ParseBool(val); ok {
settings.ControlProtection = true
}
settings.ControlProtection, err = strconv.ParseBool(val)
case "NEKO_SESSION_IMPLICIT_HOSTING":
if ok, _ := strconv.ParseBool(val); !ok {
settings.ImplicitControl = false
}
settings.ImplicitControl, err = strconv.ParseBool(val)
case "NEKO_DESKTOP_SCREEN":
settings.Screen = val
//case "NEKO_MAX_FPS": // TODO: not supported yet