accounts: make ombi/jellyseerr appliction optional on "modify settings"

Checkboxes added when applying from a profile.
This commit is contained in:
Harvey Tindall
2024-07-30 21:36:06 +01:00
parent 785395dd20
commit 2a6937228c
6 changed files with 61 additions and 24 deletions

View File

@@ -1374,12 +1374,12 @@ func (app *appContext) ApplySettings(gc *gin.Context) {
displayprefs = profile.Displayprefs
}
policy = profile.Policy
if app.config.Section("ombi").Key("enabled").MustBool(false) {
if req.Ombi && app.config.Section("ombi").Key("enabled").MustBool(false) {
if profile.Ombi != nil && len(profile.Ombi) != 0 {
ombi = profile.Ombi
}
}
if app.config.Section("jellyseerr").Key("enabled").MustBool(false) {
if req.Jellyseerr && app.config.Section("jellyseerr").Key("enabled").MustBool(false) {
if profile.Jellyseerr.Enabled {
jellyseerr = profile.Jellyseerr
}