XMLTV troubleshooting

Two XMLTV rows are duplicates after converting to UTC

Different written offsets can describe the same programme interval.

Different written offsets can describe the same programme interval.

Reproduce the condition

The XMLTV sample below is a small synthetic file. It carries no active media source or account data.

<tv>
  <channel id="news.example"><display-name>Example News</display-name></channel>
  <programme start="20250715180000 +0000" stop="20250715190000 +0000" channel="news.example"><title>Evening test</title></programme>
  <programme start="20250715190000 +0100" stop="20250715200000 +0100" channel="news.example"><title>Evening test</title></programme>
</tv>

What the local check found

Reproducible check against the packaged fixture and parser.
Expected signalObserved signal
Repeated equivalent programme rowRepeated equivalent programme row

What to do next

Normalize the start and stop to UTC before deduplicating exact same-channel, same-title intervals. Keep genuinely distinct events.

What to share if the problem continues

  • The exact parser result and version of the importer or player.
  • A minimal redacted sample with dates, IDs or segment names retained as needed.
  • The output after checking the source export separately from the viewer app.

Compare the channel and the actual time interval

Consider two schedules for the same channel. One entry starts at 19:30 +0000 and ends at 20:00 +0000. The other starts at 20:30 +0100 and ends at 21:00 +0100 on the same date. Both describe the same half-hour in UTC. A tool that compares only their written clock times could mistakenly leave two programme rows.

Before merging, check that the channel identifier is the same or is mapped through your known channel list. Also check the title and any episode or programme identifier. Different channels can carry the same title at the same time. Even on one channel, two consecutive episodes can share a series title.

ComparisonSafe interpretation
Same channel, title and UTC intervalPossible duplicate. Verify episode metadata before merging
Same title and interval, different channel IDsKeep separate unless the IDs are confirmed aliases
Same title, adjacent time slotsCompare episode or programme identifiers
Same start but different stop timesLook for schedule changes, updates or split coverage

Decide which record to retain after checking the source

Keep the authoritative schedule record when the source identifies which is current. Preserve the original date, offset and ID in a private audit note so you can explain later changes. If start and stop times are present, XMLTV treats the time slot as including its start and excluding its stop. A programme ending at 20:00 can therefore sit next to a distinct programme starting at 20:00.

Use two confirmed rows as a small fixture before applying a deduplication change to a larger guide. The worked example uses a synthetic schedule.

Sources and further reading