Settings for background channels: on/off, how many, and which teams #100

Closed
opened 2026-11-07 23:27:46 -05:00 by cmoriarty · 2 comments
Owner

Follow-up to #96. Background channels went live on 2026-11-08 with UTEP vs. Hawai'i: the channel was warm before the tune, and the tune came up quickly.

Why

Each background channel plays its stream with nobody watching, so it costs the stream's full bitrate (about 3 Mbit/s each, about 15 Mbit/s at the limit of 5). The only control today is CHANNEL_BACKGROUND_LIMIT in stack 131's environment. Changing it means editing the stack and redeploying, which is too slow when bandwidth is needed for something else right now.

What

Settings in the app, applied at the next background round (15 s):

  • On/off. Turning it off closes the background channels nobody is watching. A watched one plays on until its viewer leaves.
  • How many games, replacing CHANNEL_BACKGROUND_LIMIT (the env var stays as the starting value).
  • A short list: which followed teams (or leagues) get a background channel, for example a "keep warm" toggle per team on the Watchlist page. An empty list means every followed game, ranked as today.
  • What it costs: the Mbit/s the background channels are using now, shown next to the switch.

Possibly also WATCH_LINKS_LIMIT (the watch's polling), which is much cheaper (about 25–50 KB/s per link).

Notes

  • The app has no settings store yet. #62 also wants the first one. Keep it beside watchlist.json in the data folder so it survives restarts.
  • Where it sits: the per-team toggle on the Watchlist page; the switch, the count and the cost in the Admin page's live bar from the redesign (option 2C). Help text goes behind an info icon.
  • Still to decide: does a short-listed game rank above the others, and does it count toward the limit or go past it?
Follow-up to #96. Background channels went live on 2026-11-08 with UTEP vs. Hawai'i: the channel was warm before the tune, and the tune came up quickly. ## Why Each background channel plays its stream with nobody watching, so it costs the stream's full bitrate (about 3 Mbit/s each, about 15 Mbit/s at the limit of 5). The only control today is `CHANNEL_BACKGROUND_LIMIT` in stack 131's environment. Changing it means editing the stack and redeploying, which is too slow when bandwidth is needed for something else right now. ## What Settings in the app, applied at the next background round (15 s): - **On/off.** Turning it off closes the background channels nobody is watching. A watched one plays on until its viewer leaves. - **How many games**, replacing `CHANNEL_BACKGROUND_LIMIT` (the env var stays as the starting value). - **A short list:** which followed teams (or leagues) get a background channel, for example a "keep warm" toggle per team on the Watchlist page. An empty list means every followed game, ranked as today. - **What it costs:** the Mbit/s the background channels are using now, shown next to the switch. Possibly also `WATCH_LINKS_LIMIT` (the watch's polling), which is much cheaper (about 25–50 KB/s per link). ## Notes - The app has no settings store yet. #62 also wants the first one. Keep it beside `watchlist.json` in the data folder so it survives restarts. - Where it sits: the per-team toggle on the Watchlist page; the switch, the count and the cost in the Admin page's live bar from the redesign (option 2C). Help text goes behind an info icon. - Still to decide: does a short-listed game rank above the others, and does it count toward the limit or go past it?
Author
Owner

Deployed 2026-11-08 08:48Z as 1.2.0: PR #113 (merge 654a9a7), released through release/1.2.0 (tag v1.2.0), container b0f1f361509d. The OpenSpec change settings-and-recoveries is archived in d013eb4.

Live now:

  • The Admin page's top bar has a flame showing the background channels running against the count (e.g. 2/5), plus their Mbit/s while any run. Click it for the on/off switch, a 1–10 stepper, a meter and the kept-warm teams; the help is behind the info icon.
  • The Watchlist page shows a flame on every team and league while background channels are on.
  • Storage: the settings live in settings.json beside watchlist.json, so they survive restarts. CHANNEL_BACKGROUND_LIMIT is only the starting value now.
  • Timing: a change applies at the next 15 s round. Off closes the unwatched background channels, and a watched one plays on.

Decisions I took on the open questions (yours to reverse):

  • A kept-warm list is a filter, not a priority: with any entry kept warm, only its games get a background channel.
  • Kept-warm games count toward the limit, because the limit is the bandwidth guard. They are ranked as before: both teams followed, then one team, then the league, then kickoff.
  • WATCH_LINKS_LIMIT stays an env var. The watch costs about 25–50 KB/s a link, and a switch for it didn't seem worth the space.

Left open until it has been used on a game night.

Deployed 2026-11-08 08:48Z as **1.2.0**: PR #113 (merge 654a9a7), released through `release/1.2.0` (tag `v1.2.0`), container b0f1f361509d. The OpenSpec change `settings-and-recoveries` is archived in d013eb4. Live now: - **The Admin page's top bar** has a flame showing the background channels running against the count (e.g. 2/5), plus their Mbit/s while any run. Click it for the on/off switch, a 1–10 stepper, a meter and the kept-warm teams; the help is behind the info icon. - **The Watchlist page** shows a flame on every team and league while background channels are on. - **Storage:** the settings live in `settings.json` beside `watchlist.json`, so they survive restarts. `CHANNEL_BACKGROUND_LIMIT` is only the starting value now. - **Timing:** a change applies at the next 15 s round. Off closes the unwatched background channels, and a watched one plays on. **Decisions I took on the open questions** (yours to reverse): - A kept-warm list is a **filter**, not a priority: with any entry kept warm, only its games get a background channel. - Kept-warm games **count toward the limit**, because the limit is the bandwidth guard. They are ranked as before: both teams followed, then one team, then the league, then kickoff. - `WATCH_LINKS_LIMIT` stays an env var. The watch costs about 25–50 KB/s a link, and a switch for it didn't seem worth the space. Left open until it has been used on a game night.
Author
Owner

Closing: the fix is merged to develop in PR #113 (654a9a7) and deployed as 1.2.0.

Seen live on 2026-11-08: the top bar's flame showed 1/5 at 1.3 Mbit/s for the Liverpool game, then 2/5 at 2.8 Mbit/s, and a watched channel left the count as designed.

Not seen yet: switching off, changing the count, or a kept-warm team on a game night. A new issue if any of them misbehaves.

The controls move into the settings gear's pane in #117.

Closing: the fix is merged to develop in PR #113 (654a9a7) and deployed as 1.2.0. **Seen live on 2026-11-08:** the top bar's flame showed 1/5 at 1.3 Mbit/s for the Liverpool game, then 2/5 at 2.8 Mbit/s, and a watched channel left the count as designed. **Not seen yet:** switching off, changing the count, or a kept-warm team on a game night. A new issue if any of them misbehaves. The controls move into the settings gear's pane in #117.
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/sports-breaker#100
No description provided.