What templates do
When Teamarr generates EPG, it uses templates to produce XMLTV programme entries. Each template specifies:- Title, subtitle, and description formats using variables like
{team_name},{opponent},{game_time} - Artwork URL for programme thumbnails
- Filler content for pregame, postgame, and idle periods (team templates)
- Conditional logic to vary descriptions based on game context
- XMLTV metadata such as categories and broadcast flags
Team templates vs event templates
Choose the template type based on which EPG workflow you are using. The type cannot be changed after creation.- Team templates
- Event templates
Team templates are for persistent channels dedicated to a single team.
- The channel exists 24/7 regardless of whether a game is scheduled
- Content is written from the team’s perspective:
{team_name}is always your team,{opponent}is always the other side - Supports
.nextand.lastsuffixes for referencing upcoming and previous games - Filler content (pregame, postgame, idle) keeps the channel populated when no game is live
- Assigned directly to teams on the Teams page
| Context | Suffix | Example variable | Use case |
|---|---|---|---|
| Current game | (none) | {opponent} | Live programme during a game |
| Next game | .next | {opponent.next} | Pregame and idle content |
| Last game | .last | {opponent.last} | Postgame recaps |
Use team templates when
You want dedicated 24/7 channels for specific teams and need filler content,
.next/.last context, and team-perspective descriptions.Use event templates when
Your IPTV provider has game-specific streams and channels should appear and disappear with live events.
Template form tabs
The template editor is organized into five tabs:| Tab | Purpose |
|---|---|
| Basic Info | Template name and event duration settings |
| Defaults | Title, subtitle, description(s), artwork URL, and channel name/logo (event templates only) |
| Conditions | Priority-based rules that substitute a different description based on game context (team templates only) |
| Fillers | Pregame, postgame, and idle programmes with their own title/description/artwork (team templates only) |
| Other EPG Options | XMLTV categories, tags (new/live/date), and video quality metadata |
Variables
Templates use variables in curly braces that are replaced with real data at generation time:Filler content
Team templates support three types of filler to keep channels populated when no live game is running:| Filler | When it shows |
|---|---|
| Pregame | The configurable window of hours before the game starts |
| Postgame | After the game ends until midnight (or until the next programme) |
| Idle | Days when no game is scheduled at all |
.next and .last suffixes.
Example idle description:
Conditions system
Conditions let team templates show different descriptions based on what is happening around the game. Instead of a single static description, you define multiple options each with a priority and a trigger. Teamarr evaluates all conditions and selects the highest-priority match (lowest number wins). If multiple conditions match at the same priority, one is chosen at random — useful for variety. Priority ranges:| Priority | Purpose |
|---|---|
| 1–49 | High-priority conditions (rare situations like playoffs) |
| 50–99 | Normal conditions (home/away, streaks, broadcast) |
| 100 | Default fallback — always matches |
Home / Away
Home / Away
is_home — team is playing at homeis_away — team is playing on the roadStreaks
Streaks
win_streak — team is on a winning streak of at least N gamesloss_streak — team is on a losing streak of at least N gamesRankings (college)
Rankings (college)
is_ranked — team is ranked (top 25)is_ranked_opponent — opponent is ranked (top 25)is_ranked_matchup — both teams are rankedis_top_ten_matchup — both teams are in the top 10Season type
Season type
is_playoff — postseason gameis_preseason — preseason or exhibition gameConference, broadcast, and odds
Conference, broadcast, and odds
is_conference_game — both teams are in the same conference (college)is_national_broadcast — game is on ABC, CBS, NBC, FOX, ESPN, TNT, or TBShas_odds — betting odds are availableopponent_name_contains — opponent name contains a specific string (case-insensitive)Always include at least one condition at priority 100 as a default fallback. Without a default, events that match no conditions will produce an empty description.
Template assignments
For team templates
Assign a team template directly on the Teams page. Click the template dropdown in a team’s row, or select multiple teams and bulk-assign.For event templates
Event template assignment uses a priority-based subscription system configured in Event Groups > Global Defaults > Template Assignments:| Rule specificity | Example | Priority |
|---|---|---|
| League-specific | NHL, AHL → “NHL Premium” template | Highest |
| Sport-specific | Soccer → “Soccer HD” template | Mid |
| Default (no sport/league) | Everything else → “Default” template | Lowest |
- Is there a league-specific rule for AHL? Yes — use “NHL Premium”.
- Is there a league rule for Premier League? No.
- Is there a sport rule for Soccer? Yes — use “Soccer HD”.
- Is there a league rule for MLB? No.
- Is there a sport rule for Baseball? No.
- Use the default template.
Real examples
Detroit Lions team template
Detroit Lions team template
A complete conditions set for an NFL team template:Idle filler description:Pregame filler description:Postgame filler description:
UFC event template
UFC event template
An event template for MMA programming:Title:Description:Because UFC streams use fighter names rather than team names, configure the Fighters custom regex extractor on the event group so the classifier correctly identifies both fighters.
Community templates (Gracenote-accurate)
Community templates (Gracenote-accurate)
The community has contributed production-ready templates designed to match real Gracenote EPG formatting as closely as possible, with dynamic artwork via Game Thumbs.These templates include:
- Gracenote-accurate title and description formats
- Dynamic matchup thumbnails showing team logos, scores, and broadcast badges
- Full filler content for pregame, postgame, and idle periods
<game-thumbs-base-url> with your Game Thumbs instance URL, then go to Templates > Import and select the file.