profiles: "add jellyseerr" checkbox on profile creation

makes things clearer to new users. Fixes #438.
This commit is contained in:
Harvey Tindall
2025-11-28 20:37:45 +00:00
parent 0ecacc6064
commit cbff3085fa
7 changed files with 38 additions and 11 deletions
+15
View File
@@ -196,6 +196,21 @@ func (app *appContext) CreateProfile(gc *gin.Context) {
return
}
}
if req.Jellyseerr && app.config.Section("jellyseerr").Key("enabled").MustBool(false) {
user, err := app.js.MustGetUser(req.ID)
if err != nil {
app.err.Printf(lm.FailedGetUser, user.Name, lm.Jellyseerr, err)
} else {
profile.Jellyseerr.User = user.UserTemplate
n, err := app.js.GetNotificationPreferencesByID(user.ID)
if err != nil {
app.err.Printf(lm.FailedGetJellyseerrNotificationPrefs, user.ID, err)
} else {
profile.Jellyseerr.Notifications = n.NotificationsTemplate
profile.Jellyseerr.Enabled = true
}
}
}
app.storage.SetProfileKey(req.Name, profile)
// Refresh discord bots, profile list
if discordEnabled {