Show "Starts in X min" in Emby for a game on the lineup before kickoff #80

Closed
opened 2026-11-01 16:19:14 -05:00 by cmoriarty · 3 comments
Owner

Seen 2026-11-01 at 21:19 UTC: Emby's Live TV row showed three games. The two that had started each showed a game time. Dolphins vs. Patriots, which was already on the ready lineup, showed nothing.

Why: the guide (build_guide in backend/app/feed.py) gives each game one programme, from kickoff to kickoff + 3 h. The Dolphins programme starts at 21:25 UTC, so before that the channel has no current programme, and Emby has no title or time to show for it:

<programme start="20261101212500 +0000" stop="20261102005500 +0000" channel="nfl-401873034">
  <title>Dolphins vs. Patriots</title>
  <desc>NFL — upcoming, 1152×648, 59.94 fps</desc>

Asked for: a channel on the lineup before kickoff shows "Starts at 4:25 PM" in Emby.

Proposed: add a pre-game programme to the guide that runs from the start of the guide window (or the time the game was listed) up to kickoff. Its title is "Dolphins vs. Patriots — Starts at 4:25 PM", or the matchup as the title with "Starts at 4:25 PM" as the sub-title or description. The game's own programme then starts at kickoff as it does now.

Details to settle

  • Time zone for "4:25 PM": XMLTV times are UTC, so the text needs the household's zone. Either use a setting (or the container's TZ), or put the time only in the programme start and let Emby show it.
  • Emby re-reads the guide on its own schedule, and the app also starts that refresh itself (guide_refresh.py), so the pre-game programme should already be in the guide when the game joins the ready lineup.
  • Jellyfin should show the same.
**Seen 2026-11-01 at 21:19 UTC:** Emby's Live TV row showed three games. The two that had started each showed a game time. Dolphins vs. Patriots, which was already on the ready lineup, showed nothing. **Why:** the guide (`build_guide` in backend/app/feed.py) gives each game one programme, from kickoff to kickoff + 3 h. The Dolphins programme starts at 21:25 UTC, so before that the channel has no current programme, and Emby has no title or time to show for it: ``` <programme start="20261101212500 +0000" stop="20261102005500 +0000" channel="nfl-401873034"> <title>Dolphins vs. Patriots</title> <desc>NFL — upcoming, 1152×648, 59.94 fps</desc> ``` **Asked for:** a channel on the lineup before kickoff shows "Starts at 4:25 PM" in Emby. **Proposed:** add a pre-game programme to the guide that runs from the start of the guide window (or the time the game was listed) up to kickoff. Its title is "Dolphins vs. Patriots — Starts at 4:25 PM", or the matchup as the title with "Starts at 4:25 PM" as the sub-title or description. The game's own programme then starts at kickoff as it does now. **Details to settle** - **Time zone for "4:25 PM":** XMLTV times are UTC, so the text needs the household's zone. Either use a setting (or the container's TZ), or put the time only in the programme start and let Emby show it. - **Emby re-reads the guide on its own schedule,** and the app also starts that refresh itself (guide_refresh.py), so the pre-game programme should already be in the guide when the game joins the ready lineup. - **Jellyfin should show the same.**
Author
Owner

Notes on the time zone:

  • The times Emby shows on started games aren't written by the app. The guide gives each game's start and stop in UTC (+0000), and Emby converts them to the household's time itself.
  • Emby can't convert a time written inside a title, so "Starts at 4:25 PM" as text needs the app to know the household's zone.
  • The app's container has no TZ set. In docker-compose.yml, TZ=America/New_York belongs to the flaresolverr service. games.py hard-codes America/New_York, but only to match ESPN's dates.
  • Options:
    • (a) Add TZ to the app's service, or reuse games.py's zone, and write the time into the title.
    • (b) Let the pre-game entry end at kickoff, so Emby shows its end time (4:25 PM) in local time without the app writing any time.
  • (b) needs no time zone; check how Emby shows the end time before choosing.
Notes on the time zone: - The times Emby shows on started games aren't written by the app. The guide gives each game's start and stop in UTC (`+0000`), and Emby converts them to the household's time itself. - Emby can't convert a time written inside a title, so "Starts at 4:25 PM" as text needs the app to know the household's zone. - The app's container has no TZ set. In docker-compose.yml, `TZ=America/New_York` belongs to the flaresolverr service. games.py hard-codes America/New_York, but only to match ESPN's dates. - **Options:** - (a) Add TZ to the app's service, or reuse games.py's zone, and write the time into the title. - (b) Let the pre-game entry end at kickoff, so Emby shows its end time (4:25 PM) in local time without the app writing any time. - (b) needs no time zone; check how Emby shows the end time before choosing.
Author
Owner

Emby's Live Sports row, 2026-11-01:

  • A game that has started shows the current programme: its title, its "1:00 PM – 4:30 PM" (Emby's own conversion of our UTC times) and a progress bar.
  • Dolphins vs. Patriots, before kickoff, has no current programme. Emby falls back to the channel number and name ("119 Dolphins vs. Patriots") and shows no time.

Revised proposal: a pre-game programme from the time the game joins the lineup up to kickoff.

  • Emby would then show its title, a range ending at kickoff (for example "4:05 PM – 4:25 PM") and a bar counting down to kickoff.
  • On its own, that range reads like a show that ends at 4:25 rather than a game that starts then. So the title also says it: "Dolphins vs. Patriots · Starts 4:25 PM".
  • That title needs the household's zone. Set TZ=America/New_York on the sports-breaker service (it has none today) and format kickoff in local time. Fall back to the range alone when TZ is unset.
Emby's Live Sports row, 2026-11-01: - **A game that has started** shows the current programme: its title, its "1:00 PM – 4:30 PM" (Emby's own conversion of our UTC times) and a progress bar. - **Dolphins vs. Patriots, before kickoff,** has no current programme. Emby falls back to the channel number and name ("119 Dolphins vs. Patriots") and shows no time. **Revised proposal:** a pre-game programme from the time the game joins the lineup up to kickoff. - Emby would then show its title, a range ending at kickoff (for example "4:05 PM – 4:25 PM") and a bar counting down to kickoff. - On its own, that range reads like a show that ends at 4:25 rather than a game that starts then. So the title also says it: "Dolphins vs. Patriots · Starts 4:25 PM". - That title needs the household's zone. Set `TZ=America/New_York` on the sports-breaker service (it has none today) and format kickoff in local time. Fall back to the range alone when TZ is unset.
Author
Owner

Decision (Chris, 2026-11-01): no time zone. The pre-game entry says "Starts in X min".

Staleness: Emby reads the guide only on a refresh, so one programme titled "Starts in 20 min" would keep saying that until the next one. The fix is to cut the pre-game time into slices of their own in the guide:

  • one programme per slice up to kickoff, each titled for its own start, for example "Dolphins vs. Patriots · Starts in 15 min" from 4:10 to 4:15;
  • Emby moves to the next slice by itself as the clock passes, with no guide refresh;
  • slices of 5 min near kickoff, and coarser further out (for example "Starts in 1 h" for each hour before the last one);
  • the game's own programme still starts at kickoff.

Check: the slices line up with kickoff, the last slice ends exactly at it, and Emby's card counts down without a refresh.

**Decision (Chris, 2026-11-01): no time zone. The pre-game entry says "Starts in X min".** **Staleness:** Emby reads the guide only on a refresh, so one programme titled "Starts in 20 min" would keep saying that until the next one. The fix is to cut the pre-game time into slices of their own in the guide: - one programme per slice up to kickoff, each titled for its own start, for example "Dolphins vs. Patriots · Starts in 15 min" from 4:10 to 4:15; - Emby moves to the next slice by itself as the clock passes, with no guide refresh; - slices of 5 min near kickoff, and coarser further out (for example "Starts in 1 h" for each hour before the last one); - the game's own programme still starts at kickoff. Check: the slices line up with kickoff, the last slice ends exactly at it, and Emby's card counts down without a refresh.
cmoriarty changed title from Show "Starts at <time>" in Emby for a game on the lineup before kickoff to Show "Starts in X min" in Emby for a game on the lineup before kickoff 2026-11-01 16:22:48 -05:00
Sign in to join this conversation.
No labels
No milestone
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#80
No description provided.