0.2.76 - Icon Packs

This commit is contained in:
ponzischeme89
2026-08-18 14:59:29 +12:00
parent 36d171e51b
commit 8c847c59b8
70 changed files with 5267 additions and 673 deletions
+21 -5
View File
@@ -59,8 +59,11 @@ type Server struct {
credits *credits.Service
creditsLoad *credits.PlaybackLoad
syncer syncerHandle
log *slog.Logger
events *serverlogging.Buffer
// ingester records what Sonarr and Radarr say changed. Nil where no webhook token is
// configured, which is also what makes both hooks 404.
ingester ingesterHandle
log *slog.Logger
events *serverlogging.Buffer
// adminEvents is the administrative feed: the console's notification bell and every
// outgoing integration read from it. Distinct from `events` above, which is the
// structured log ring — a log line is what the gateway did, an admin event is
@@ -96,6 +99,9 @@ type Server struct {
// logged by name.
playbackTitles playbackTitles
// ingestRuns collapses a season pack's worth of finished scans into one banner.
ingestRuns ingestRuns
recommendationBuilds recommendationBuilds
maintenance maintenanceState
quietTime quietTimeState
@@ -130,6 +136,7 @@ type Deps struct {
Credits *credits.Service
CreditsLoad *credits.PlaybackLoad
Syncer syncerHandle
Ingester ingesterHandle
Log *slog.Logger
Events *serverlogging.Buffer
@@ -157,6 +164,7 @@ func New(cfg config.Config, deps Deps) *Server {
credits: deps.Credits,
creditsLoad: deps.CreditsLoad,
syncer: deps.Syncer,
ingester: deps.Ingester,
log: deps.Log,
events: deps.Events,
@@ -314,9 +322,17 @@ func (s *Server) Routes() http.Handler {
// status even while every normal /v1 operation is deliberately unavailable.
mux.Handle("GET /v1/status", s.authed(s.handleServiceStatus))
mux.Handle("/v1/", s.maintenanceGate(v1))
// Radarr pushes here when an import finishes. Outside the gate on purpose: an event
// arriving during maintenance would otherwise be lost rather than delayed.
mux.Handle("POST /hooks/radarr", s.quietTimeGate(http.HandlerFunc(s.handleRadarrWebhook)))
// Sonarr and Radarr push here when something lands, is upgraded, is renamed or is
// deleted. Outside the maintenance gate on purpose: an event arriving during
// maintenance would otherwise be lost rather than delayed.
//
// Outside the *quiet-time* gate too, which the Radarr hook was previously inside. That
// gate answers 503, and neither *arr re-delivers — so a quiet hour used to silently
// discard every import that happened during it. The durable queue is what makes the
// distinction possible: the hook records the news whatever the hour, and the worker is
// where quiet time is honoured.
mux.HandleFunc("POST /hooks/radarr", s.handleRadarrWebhook)
mux.HandleFunc("POST /hooks/sonarr", s.handleSonarrWebhook)
// State the canonical console URL explicitly. The console and its assets live below
// /admin/, while a bare /admin is routinely typed and some reverse proxies do not
// preserve ServeMux's implicit trailing-slash redirect for a mounted subtree.