From 6607a469a28550d34c31bce1d05f04c5aa1f8077 Mon Sep 17 00:00:00 2001 From: Aculix Technologies Date: Tue, 8 Sep 2026 15:07:14 +0530 Subject: [PATCH] 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. --- src/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 11f384a..44ad1d2 100644 --- a/src/index.js +++ b/src/index.js @@ -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,