XMLTV feed from TVHeadEnd Not Displaying in ChannelsDVR Guide

Quick Background on Setup: I am running TvHeadEnd (4.2.8-dirty) and Channels (2024.02.11.0311) an Ubuntu server, and things are working great except that my XMLTV data feed from TvHeadEnd doesn't display in the Channels DVR Guide.

When I Edit Settings for that source, I put http://localhost:9981/xmltv/channels into the XMLTV guide data field. When I click "Save", nothing seems to happen, and there is no data within my Channels DVR guide.

Note that when I go to http://localhost:9981/xmltv/channels within my web browser, the XMLTV data feed comes up, although it does have an "XML Parsing Error: not well-formed" error associated with it.

Any suggestions for getting this XMLTV data into Channels DVR?

Thanks!

What does the Log show

Good question. The log actually shows the same message as Chrome does when I load up the XMLTV file, so it seems that the issue does relate to the format of the XML file coming from TvHeadEnd.

2024/02/26 08:20:06.194666 [DVR] Fetched guide data for XMLTV-TVHEBen in 5ms
2024/02/26 08:20:06.196431 [ERR] No stations available in lineup XMLTV-TVHEBen after guide data download: XML syntax error on line 857: invalid UTF-8
2024/02/26 08:20:06.198203 [ERR] Failed to get placeholder channels for lineup XMLTV-TVHEBen: XML syntax error on line 857: invalid UTF-8
2024/02/26 08:20:06.198304 [IDX] Pruned 0 expired groups from XMLTV-TVHEBen in 55.444µs.

Here is the solution that I came up with.

  1. Created a bash script called xmlhandler to download the TvHeadEnd XMLTV file, save it to my public html directory, and remove non-printable characters.
 #!/bin/bash         
wget -N http://localhost:9981/xmltv/channels -O /var/www/html/channels
LANG=C sed -i 's/[\d128-\d255]//g' /var/www/html/channels
  1. CHMOD the bash script so that CRON can execute it.
chmod +x /home/bniebel/channels-dvr/xmlhandler
  1. Schedule the bash script to run hourly in Cron.
* * * * * /home/bniebel/channels-dvr/xmlhandler &>/home/bniebel/Desktop/cronlog
  1. Pointed ChannelsDVR to the cleaned up file in my public-html directory.
XMLTV Guide Date = http://localhost/channels
1 Like

Can you raise this with the tvheadend devs?