Skip to content

Releases: andyj682/dispatcharr_dummy_epg_offset

v1.0.0 - initial release

Choose a tag to compare

@andyj682 andyj682 released this 05 Oct 06:23

First release. A Dispatcharr plugin that shifts the start time of a dummy EPG's
events by a set number of minutes, per source — so a client that records from
the guide (Emby, Plex, Jellyfin, etc.) starts recording when the stream is
actually live, not when the listing claims it is.

The problem it solves

Event streams often carry a start time in the channel or stream name, which
Dispatcharr's dummy EPG parses into a guide entry. Those scraped times are
frequently off by a fixed amount — the listing says 8:00, the stream doesn't
come up until 8:10. Watching live, you wait a few minutes. Recording
unattended, you get a failed or partial recording, because the recorder
connected to a stream that wasn't live yet.

Dispatcharr's only time control for a dummy EPG is the source/output time zone,
which moves a guide in whole-hour steps. There was no way to say "this
particular guide runs ten minutes early."

What it does

  • Per-source offsets. One source name = minutes line per dummy EPG.
    Positive minutes push events later, negative pull them earlier. Sources you
    don't list are passed through completely untouched, so an empty settings box
    means the plugin does nothing at all.
  • The whole event moves together. The guide slot in Dispatcharr's own guide
    view, the program times in the exported XMLTV and XC EPG (which is what your
    recorder schedules from), and any time token rendered into your title,
    subtitle or description templates ({starttime}, {endtime}, {date},
    etc.) all shift as one — so a program can't sit at 8:10 while its title
    still says 8:00.
  • Program duration is unchanged. Dispatcharr still computes the end as
    start + that source's own Program duration setting, now measured from the
    adjusted start. A +10 offset on a 180-minute duration gives a slot ten
    minutes later that is still 180 minutes long.
  • Handles midnight. If a shift crosses midnight and the source has a
    numeric date pattern, the date rolls with it — including across month and
    year boundaries.
  • Takes effect immediately on the next guide request, with no EPG refresh.

Install

  1. Download dispatcharr_dummy_epg_offset.zip from this release.
  2. Dispatcharr → Plugins → Import → upload the zip.
  3. Enable it (accept the trust warning — plugins run server-side code).
  4. Restart the Dispatcharr container so every worker applies the plugin.

Settings

Setting Default What it does
Start offsets by dummy EPG source (empty) One source name = minutes per line. The name must match the dummy EPG source's name on the EPG page (case-insensitive).

Actions: Check status (patch state, wrapped call sites, the offsets it
parsed, and any settings lines it couldn't understand) and List sources
(every dummy EPG source by exact name, with its current offset, flagging any
source that has no time pattern to shift).

Verifying

Add an offset for one source, then open Dispatcharr's Guide view. It is
served by the same code path as the XMLTV your client downloads, so if the
times look right there, your client gets the same thing. Each event on the
offset source should sit exactly your offset later than it did before
(the guide shows times converted to your output time zone, as usual).

If nothing moved, click Check status — the usual causes are a source name
that doesn't match the EPG page, or a source with no time pattern configured.

Note that the sample-title preview in Dispatcharr's dummy EPG settings form is
computed in the browser, so it always shows the unshifted time. Check the guide
instead.

Notes

  • Dummy EPG sources only. Real XMLTV and Schedules Direct sources never go
    through the generator this plugin wraps.
  • The source needs a time pattern with an hour named group; that is what gets
    rewritten. Any stop: value in a stream name is ignored, exactly as stock
    Dispatcharr ignores it.
  • Fail-open. Any unexpected error is logged and falls through to
    Dispatcharr's unmodified output; the plugin will not stop a guide from
    rendering. Disabling it restores stock behavior immediately.
  • Verified against Dispatcharr 0.31.0.
  • Independent of the author's VOD plugins
    (dispatcharr_vod_preferences,
    dispatcharr_vod_concurrency_fix,
    dispatcharr_vod_episode_sweep,
    dispatcharr_vod_merge):
    they patch VOD code paths, this patches live-TV EPG generation, and they
    share no functions or state. Safe to run alongside all of them.

See DESIGN.md
for why the offset is applied to the parse name rather than to the generated
programs.

Designed and built by andyj682 with Claude
(Anthropic) as a pair-programming collaborator.