feat: status endpoint reports what each site is actually watching

Adds a 'watching' block with the movie id, variant, venue and format filter per
provider. A wrong id or an unexpectedly narrow filter was previously impossible
to tell apart from 'nothing on sale yet', since both just report closed.
This commit is contained in:
Aculix Technologies committed 2026-09-08 15:07:14 +05:30
1 parent 67e97f5a6a
commit 6607a469a2
1 file changed
+8 -1
+8 -1
View File
@@ -158,7 +158,14 @@ function startStatusServer(cfg) {
const out = {
now: ts(),
targetDate: cfg.targetDate,
providers: cfg.providers.map((p) => p.key),
// What each site is actually watching. Without this, a misconfigured id or an
// unexpectedly narrow filter is indistinguishable from "nothing on sale yet".
watching: Object.fromEntries(cfg.providers.map((p) => [p.key, {
movie: p.contentId ?? p.eventCode,
variant: p.movieCode || p.language || "(any language/format variant)",
venue: p.venueId || "(any venue)",
format: [p.formatTag, p.formatMatch].filter(Boolean).join(" or ") || "(any format)",
}])),
proxied: Boolean(cfg.dispatcher),
retired: state.retired,
lastTick,