This commit is contained in:
ponzischeme89
2026-08-19 06:57:59 +12:00
parent 8c847c59b8
commit 2b43b9ef12
94 changed files with 6359 additions and 778 deletions
+8 -1
View File
@@ -29,6 +29,7 @@ import (
"github.com/ponzischeme89/memby/server/internal/library"
"github.com/ponzischeme89/memby/server/internal/logging"
"github.com/ponzischeme89/memby/server/internal/mdblist"
"github.com/ponzischeme89/memby/server/internal/notify"
"github.com/ponzischeme89/memby/server/internal/radarr"
"github.com/ponzischeme89/memby/server/internal/recommend"
"github.com/ponzischeme89/memby/server/internal/scheduler"
@@ -262,7 +263,12 @@ func run(log *slog.Logger, events *logging.Buffer, logLevel *slog.LevelVar) erro
// takes all three: a handler that could not publish would have to check for nil at
// every call site, which is exactly how an event comes to be silently dropped.
adminBus := adminevents.New(st, log)
dispatcher := integrations.New(st, log, adminBus)
// The notification service is built before both the dispatcher and the server, because
// both write into it: the dispatcher records what it posted to Discord, and the server
// registers the in-app and broadcast providers on it. The store is its recorder, which
// is the whole audit trail.
notifier := notify.New(st, log)
dispatcher := integrations.New(st, log, adminBus, notifier)
adminBus.AddSink(dispatcher)
sched := scheduler.New(st, log, adminBus)
@@ -286,6 +292,7 @@ func run(log *slog.Logger, events *logging.Buffer, logLevel *slog.LevelVar) erro
AdminEvents: adminBus,
Scheduler: sched,
Integrations: dispatcher,
Notify: notifier,
LogLevel: logLevel,
})
if err := server.LoadQuietTime(ctx); err != nil {