Disclaimer: This documentation is provided for convenience and may contain errors. Always verify information against the official Kodi and provider documentation. Report issues.
Fastmail
Home / Files / blaze.py

resources/lib/blaze.py — Blaze TV live resolver

Path /resources/lib/blaze.py Lines 36 Type playback resolver (HLS or DASH, no DRM) ← called by default.py:_resolve_channel → calls watch.blaze.tv HTML scrape + Blaze stream API, setup_dash_item

Role

Resolves Blaze TV's live channel. Blaze is a free-to-air reality-TV channel — no DRM, no auth, just two HTML scrapes on the way to the manifest URL.

Constants

URL_LIVE = "https://watch.blaze.tv/live/" · line 5

Blaze's public-facing live page. item_id maps to Blaze's internal uvid; there's a small known set of fallbacks — line 11-12: ("1227", "1228", "1229", "1235", "1236") are the recognized "live" stream ids; anything else falls back to "553" (the default national feed).

URL_STREAM = "%s/streams/api/live/stream/?key=&autoplay=1&gpdr=1&gpdr_consent=undefined&platform=chrome" · line 6

The actual stream-info API endpoint. %s is the stream_base scraped out of the live page (it varies). The key is per-page per-uvid, scraped out of the same page.

Resolver

resolve(item_id, listitem) · line 9

Steps:

  1. Fetch the live HTML page.
  2. Regex-match the "streams": "<…blaze.tv/streams/…" config in the HTML — this is the stream-base URL with escape backslashes that the JSON in HTML uses.
  3. Regex-match all data-key="<…>" and data-uvid="<…>" entries on the page.
  4. Pair them up via zip(keys, uvids) and pick the pair whose uvid equals item_id. Fall back to the first pair if no exact match (line 28).
  5. Fetch the stream-info API; it returns JSON with response.stream — the actual m3u8/mpd URL, with a query string we strip off via .split("?", 1)[0] (Blaze appends auth tokens that aren't required for playback from a UK IP).
  6. Inspect the URL: HLS if .m3u8 in the URL, otherwise DASH.
  7. Hand to setup_dash_item with the right manifest_type. No license URL — Blaze is unprotected.
The regex is fragile

If Blaze's static-HTML team changes the "streams":"…" JSON config shape, this resolver breaks instantly. There's no JSON-RPC API Blaze exposes for the live stream. They've been stable for ~2 years as of writing, which is the only reason the addon still ships this. Worth fixing with a JSON-parser fallback to a