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
+26 -1
View File
@@ -167,6 +167,20 @@ func run(log *slog.Logger, events *logging.Buffer, logLevel *slog.LevelVar) erro
DeviceID: "memby-gateway-sync",
Gateway: true,
}, log.With("component", "library"))
// Sonarr and Radarr are what put files on disk, so they are what the catalogue learns
// from. The worker is built whenever either webhook is configured; with neither token
// set both hooks 404 and nothing here ever has anything to do, so it is not started.
var ingester *library.Ingester
if cfg.SonarrWebhookToken != "" || cfg.RadarrWebhookToken != "" {
ingester = &library.Ingester{
Store: st,
Emby: embyClient,
Credentials: syncer.EmbyCredentials,
Log: log.With("component", "library-ingest"),
Settle: cfg.IngestSettleDelay,
}
}
var forYouService *foryou.Service
if tracearrClient != nil {
forYouService = foryou.New(
@@ -265,6 +279,7 @@ func run(log *slog.Logger, events *logging.Buffer, logLevel *slog.LevelVar) erro
Credits: creditsService,
CreditsLoad: creditsLoad,
Syncer: syncer,
Ingester: ingester,
Log: log,
Events: events,
@@ -283,6 +298,16 @@ func run(log *slog.Logger, events *logging.Buffer, logLevel *slog.LevelVar) erro
creditsService.SetPaused(server.ActivityPaused)
go creditsService.Run(ctx)
}
if ingester != nil {
// Quiet time is honoured here rather than at the hook: the webhook is recorded
// whatever the hour, and this is what waits.
ingester.Paused = server.ActivityPaused
// The news follows the scan rather than the webhook, so the banner can say a title
// is there rather than that it is coming. Installed here for the same reason
// SetAfterSync is: library stays ignorant of what an alert is.
ingester.Announce = server.AnnounceLibraryIngest
go ingester.Run(ctx)
}
// Registration is separate from construction so the task list reads as a declaration
// of what the gateway does in the background rather than as more wiring in here.
@@ -326,7 +351,7 @@ func run(log *slog.Logger, events *logging.Buffer, logLevel *slog.LevelVar) erro
}
go server.WatchUpdatePolicy(ctx, 60*time.Second)
go syncer.Schedule(ctx, cfg.SyncInterval, server.ActivityPaused)
go syncer.Schedule(ctx, server.LibrarySyncInterval, server.ActivityPaused)
if cfg.SyncOnStart {
go func() {
if server.ActivityPaused() {