tasks: add /tasks/jellyseerr, document

now live in tasks.go and have actual API documentation.
/tasks/jellyseerr triggers account import.
This commit is contained in:
Harvey Tindall
2025-11-28 17:26:27 +00:00
parent f36a32773a
commit 0ecacc6064
7 changed files with 90 additions and 31 deletions
+19 -17
View File
@@ -112,19 +112,19 @@ type appContext struct {
adminUsers []User
invalidTokens []string
// Keeping jf name because I can't think of a better one
jf *mediabrowser.MediaBrowser
authJf *mediabrowser.MediaBrowser
ombi *OmbiWrapper
js *JellyseerrWrapper
thirdPartyServices []ThirdPartyService
storage *Storage
validator Validator
email *Emailer
telegram *TelegramDaemon
discord *DiscordDaemon
matrix *MatrixDaemon
housekeepingDaemon, userDaemon *GenericDaemon
contactMethods []ContactMethodLinker
jf *mediabrowser.MediaBrowser
authJf *mediabrowser.MediaBrowser
ombi *OmbiWrapper
js *JellyseerrWrapper
thirdPartyServices []ThirdPartyService
storage *Storage
validator Validator
email *Emailer
telegram *TelegramDaemon
discord *DiscordDaemon
matrix *MatrixDaemon
housekeepingDaemon, userDaemon, jellyseerrDaemon *GenericDaemon
contactMethods []ContactMethodLinker
LoggerSet
host string
port int
@@ -516,12 +516,11 @@ func start(asDaemon, firstCall bool) {
go app.userDaemon.run()
defer app.userDaemon.Shutdown()
var jellyseerrDaemon *GenericDaemon
if app.config.Section("jellyseerr").Key("enabled").MustBool(false) && app.config.Section("jellyseerr").Key("import_existing").MustBool(false) {
// jellyseerrDaemon = newJellyseerrDaemon(time.Duration(30*time.Second), app)
jellyseerrDaemon = newJellyseerrDaemon(time.Duration(10*time.Minute), app)
go jellyseerrDaemon.run()
defer jellyseerrDaemon.Shutdown()
app.jellyseerrDaemon = newJellyseerrDaemon(time.Duration(10*time.Minute), app)
go app.jellyseerrDaemon.run()
defer app.jellyseerrDaemon.Shutdown()
}
if app.config.Section("password_resets").Key("enabled").MustBool(false) && serverType == mediabrowser.JellyfinServer {
@@ -762,6 +761,9 @@ func flagPassed(name string) (found bool) {
// @tag.name Statistics
// @tag.description Routes that expose useful info/stats.
// @tag.name Tasks
// @tag.description Manual triggers for background tasks.
func printVersion() {
tray := ""
if TRAY {