Skip to content

EPG Templates

The panel generates XMLTV-format EPG files consumed by IPTV players, Plex/Jellyfin DVR, Dispatcharr, Threadfin, and similar middleware. Every aspect of the generated XML is driven by named EPG templates assigned per-competition or per-competition-group.

Template Assignment

Each competition (or competition group) has an epg_template_id pointing to a row in the epg_templates table. Assign templates in:

  • Edit Competitions — per-competition dropdown
  • Competition Groups — per-group dropdown

If unassigned, built-in defaults apply.

Template Fields

Field Where Used Description
name UI only Human label (e.g. "Football", "MMA")
live_title Main events Title template for live events
live_desc Main events Description template for live events
upcoming_title Filler blocks Title for upcoming-event fillers
upcoming_desc Filler blocks Description for upcoming-event fillers
fallback_title Filler blocks Title when no future event exists
fallback_desc Filler blocks Description when no future event exists
category All programmes Sport/genre label (e.g. Soccer, MMA)
poster_url Main events URL pattern for programme artwork
include_date All programmes Add <date> tag (YYYYMMDD)
include_live Main events Add <live /> tag
include_new Main events Add <new /> tag

Template Variables

The engine supports 90+ variables across 13 categories, built by the centralized resolveTemplateVars() function.

In the template editor, the variable reference panel lists every available placeholder. Click any variable tag to insert it at the cursor position in the currently focused template field. If no field is focused, the variable is inserted into the Live Title field by default.

Identity

Variable Example Description
{title} Essen vs. Bayern Munich Full DAZN event title
{team1} Essen First team (parsed from title)
{team2} Bayern Munich Second team
{team1_short} Essen Short name (first word if multi-word)
{team2_short} Bayern Short name
{team1_abbrev} ESS 3-letter abbreviation (uppercase)
{team2_abbrev} BAY 3-letter abbreviation
{team1_pascal} Essen PascalCase
{team2_pascal} BayernMunich PascalCase
{team1_normalize} essen Alphanumeric lowercase (for URLs)
{team2_normalize} bayernmunich Alphanumeric lowercase
{team1_abbrev_lower} ess 3-letter abbreviation (lowercase)
{team2_abbrev_lower} bay 3-letter abbreviation (lowercase)
{league} Uefa Europa League DAZN competition name
{league_name} Uefa Europa League Alias for {league}
{league_normalize} uefaeuropaleague Normalized for URLs
{competition} UEFA_EUROPA_LEAGUE DB channel_name
{competition_normalize} uefaeuropaleague Normalized DB name
{sport} Football Sport name
{sport_lower} football Lowercase sport

Home / Away

Variable Example Description
{home_team} Essen Home team (team1)
{away_team} Bayern Munich Away team (team2)
{home_team_short} Essen Short name
{away_team_short} Bayern Short name
{home_team_abbrev} ESS 3-letter abbreviation
{away_team_abbrev} BAY 3-letter abbreviation
{home_team_pascal} Essen PascalCase
{away_team_pascal} BayernMunich PascalCase
{home_team_abbrev_lower} ess Lowercase abbreviation
{away_team_abbrev_lower} bay Lowercase abbreviation
{vs_at} vs "vs" or "at" based on context
{vs_@} vs "vs" or "@"

Matchup

Variable Example
{matchup} Essen vs Bayern Munich
{matchup_short} Essen vs Bayern
{matchup_abbrev} ESS vs BAY

Date / Time

Variable Example Description
{start_time} 7:30 PM 12-hour formatted time
{date} March 23, 2026 Full date
{game_date} March 23, 2026 Alias for {date}
{game_date_short} Mar 23 Short date
{game_date_numeric} 03/23/2026 Numeric date
{game_date_iso} 2026-03-23 ISO 8601 date
{game_day} Monday Day of week
{game_day_short} Mon Short day
{game_time} 7:30 PM 12-hour time
{game_time_24h} 19:30 24-hour time
{game_time_short} 7:30PM Compact time
{game_month} March Full month
{game_month_short} Mar Short month
{game_year} 2026 Year
{relative_day} today / tomorrow / in 3 days Relative day
{relative_day_title} Today / Tomorrow Title case
{today_tonight} tonight / today Time-aware relative
{today_tonight_title} Tonight / Today Title case
{days_until} 0 / 1 / 3 Numeric days until event

Event

Variable Example Description
{description} (varies) DAZN event description
{season} 25/26 Current season string
{asset_id} abc123def456 DAZN asset identifier
{image} img123 DAZN image identifier
{image_url} https://image.discovery... Full CDN image URL
{sport_id} 289u5typ3vp... DAZN sport ID
{competition_id} 1r097lpxe0x... DAZN competition ID
{channel_name} EUROPA01 Assigned channel name

Venue (TheSportsDB)

Variable Example Description
{venue} Signal Iduna Park Stadium/arena name
{venue_city} Dortmund Venue city
{venue_state} Germany Venue country (from TSDB strCountry)
{venue_full} Signal Iduna Park, Dortmund Venue + city combined

Scores (TheSportsDB)

Variable Example Description
{score} 2-1 Combined score
{team1_score} 2 Team 1 (home) score
{team2_score} 1 Team 2 (away) score
{home_team_score} 2 Home team score (alias)
{away_team_score} 1 Away team score (alias)

Badges & Jerseys (TheSportsDB)

Variable Example
{team1_badge} https://www.thesportsdb.com/images/media/team/badge/...
{team2_badge} Team 2 badge URL
{team1_jersey} https://www.thesportsdb.com/images/media/team/jersey/...
{team2_jersey} Team 2 jersey URL
{team1_banner} https://www.thesportsdb.com/images/media/team/banner/...
{team2_banner} Team 2 banner URL

Playoffs

Variable Example Description
{season_type} Regular Season Season type

Records (TheSportsDB)

Team win/draw/loss records from league standings.

Variable Example Description
{team1_record} 22-4-4 Team 1 season record (W-D-L)
{team2_record} 20-5-5 Team 2 season record (W-D-L)
{home_team_record} 22-4-4 Home team record
{away_team_record} 20-5-5 Away team record

Streaks (TheSportsDB)

Current form streaks derived from the league standings form string.

Variable Example Description
{team1_streak} W3 Team 1 current streak
{team2_streak} L1 Team 2 current streak

Standings (TheSportsDB)

League position and points from the current season standings table.

Variable Example Description
{team1_position} 1 Team 1 league position
{team2_position} 4 Team 2 league position
{team1_points} 70 Team 1 total points
{team2_points} 65 Team 2 total points
{playoff_seed} 1 Home team league position
{games_back} 5 Points behind league leader

XML Tags Generated

Every <programme> element includes these tags:

XML Tag Applies To Description
<title> All From live_title, upcoming_title, or fallback_title
<desc> All From live_desc, upcoming_desc, or fallback_desc
<category> All (if set) From template category field
<icon src="..."> Main events (if set) From template poster_url
<date> All (if enabled) YYYYMMDD format
<video> All <quality>HDTV</quality>
<audio> All <stereo>stereo</stereo>
<live /> Main events (if enabled) Indicates live broadcast
<new /> Main events (if enabled) Indicates first airing

Game Thumbs Integration

Game Thumbs is a self-hosted matchup thumbnail service. Set the Poster URL to generate <icon> tags pulling artwork from your Game Thumbs instance.

Poster URL pattern:

http://game-thumbs:3000/{league_normalize}/{team1_normalize}/{team2_normalize}/thumb

Image types:

Suffix Resolution Orientation
/thumb 1440×1080 Landscape
/cover 1080×1440 Portrait
/logo Original / 1024×1024 Square (transparent)

League code mapping — set competition channel_name values to match Game Thumbs league codes:

DAZN Competition Recommended channel_name Game Thumbs Code
Uefa Europa League europa europa
UEFA Champions League uefa uefa
English Premier League epl epl
La Liga laliga laliga
Serie A seriea seriea
Bundesliga bundesliga bundesliga
Ligue 1 ligue1 ligue1
MLS mls mls
NFL nfl nfl
UFC ufc ufc
NBA nba nba

Example Output

Live event with category and poster URL:

<programme start="20260323193000 +0000"
           stop="20260323220000 +0000"
           channel="EUROPA01">
  <title lang="en">LIVE europa Action: Essen vs. Bayern Munich</title>
  <desc lang="en">Watch as Essen take on Bayern Munich in live action.</desc>
  <category lang="en">Soccer</category>
  <icon src="http://game-thumbs:3000/europa/essen/bayernmunich/thumb" />
  <date>20260323</date>
  <video><quality>HDTV</quality></video>
  <audio><stereo>stereo</stereo></audio>
  <live />
  <new />
</programme>

Filler block (no <live />, <new />, or <icon>):

<programme start="20260323150000 +0000"
           stop="20260323190000 +0000"
           channel="EUROPA01">
  <title lang="en">UPCOMING: Essen vs. Bayern Munich</title>
  <desc lang="en">Upcoming at 7:30 PM Essen vs. Bayern Munich.</desc>
  <category lang="en">Soccer</category>
  <date>20260323</date>
  <video><quality>HDTV</quality></video>
  <audio><stereo>stereo</stereo></audio>
</programme>

Quick Setup

  1. Create a template — navigate to EPG Templates → New Template
  2. Set titles/descriptions — use variables like {league}, {team1}, {team2}
  3. Set Category — enter the sport name (e.g. Soccer)
  4. Set Poster URL — paste your Game Thumbs pattern: http://your-host:3000/{league_normalize}/{team1_normalize}/{team2_normalize}/thumb
  5. Enable enrichment tags — check Date, Live, and New as desired
  6. Assign template — select the template in Edit Competitions
  7. Rebuild EPG — click Make Schedule or POST /api?action=build_epg
  8. Point your player — configure IPTV player / Dispatcharr / Threadfin to pull https://dazn.xctv.stream/<epg_filename>