XMLTV via url?

Added by Jimmy Lindberg about 4 years ago


I have set up TVheadend on my windows 10 machine via Windows subsystem for Linux but i have trouble getting the EPG to work. I have tried tv_grab_file and downloaded my xml file to a location and i got it to work. The problem is that i get my xml file from They generate my xml file every 24 hours. So my question is as follows: Isn't there a way to use the url and let a grabber take the information from that url instead of downloading the xml file everyday just to update your tv guide?

Thanks in advance


Replies (29)

RE: XMLTV via url? - Added by Tom Johnson over 3 years ago

I totally agree, I set up LibreElec only to find out that wget didn't work on my url because it had a redirect. sigh.

So I finally got this set up, and had also done it the other way with the socat, and I still have the problem of nothing showing up in my Electronic Program Guide tab. Here is my output when I run the internal grabber

2018-09-03 01:36:50.665 spawn: Executing "/usr/bin/tv_grab_file"
2018-09-03 01:36:51.428 xmltv: /usr/bin/tv_grab_file: grab took 1 seconds
2018-09-03 01:36:51.713 xmltv: /usr/bin/tv_grab_file: parse took 0 seconds
2018-09-03 01:36:51.713 xmltv: /usr/bin/tv_grab_file: channels tot= 443 new= 443 mod= 443
2018-09-03 01:36:51.713 xmltv: /usr/bin/tv_grab_file: brands tot= 0 new= 0 mod= 0
2018-09-03 01:36:51.713 xmltv: /usr/bin/tv_grab_file: seasons tot= 0 new= 0 mod= 0
2018-09-03 01:36:51.713 xmltv: /usr/bin/tv_grab_file: episodes tot= 0 new= 0 mod= 0
2018-09-03 01:36:51.713 xmltv: /usr/bin/tv_grab_file: broadcasts tot= 0 new= 0 mod= 0

I have checked and my xml file does have episodes, etc. but they are referred to by a channel number in the xml, not the actual channel name. Is there a standard against which I can check my xml file to make sure it will work here?

RE: XMLTV via url? - Added by Em Smith over 3 years ago

Your file should contain a list of channels such as:

<channel id="abc.def.ghi">

Your programmes should reference the channel id such as:

<programme channel="abc.def.ghi" start="20180910112334 +0000"...>

Your epggrabber tab in Tvheadend should list all the channels it noticed in your xml file and channels that it cross-referenced to a scanned channel. This is based on the "display-name" so "ABC" in xml file will automatically link to "ABC" in your scanned channels. If it doesn't match, then you need to fix up the mappings in the Tvheadend tab.

Also check to ensure your programme start time is in the future (format is YYYYMMDDHHMMSS with timezone usually GMT).

RE: XMLTV via url? - Added by Tom Johnson over 3 years ago

I think I was running the internal grabber too soon after the download. I have no idea why it shouldn't work when I run it immediately after I watched the download complete, but for some reason it matters. I waited 3 minutes, and bang! it works ...

RE: XMLTV via url? - Added by nityfan nityfan over 3 years ago

I want to bump topic. Although this metod:

cat tv.xml | socat - UNIX-CONNECT:/path/to/xmltv.sock

works fine, I'm experiencing some issues with that:
- after tvheadend restart, no epg data loaded from xmltv, all iptv channles have no epg again. Need to write to socket again and then epg appears again.
- probably not directly related, but all iptv slots are in use all the time. On "status" page I can see it's titled "epggrab" and full bandwidth for that particular channel is used. It never stops, it looks like channel is downloading with title "epggrab". It seems to be random channel or recently played. Why? Epg is provided by xmltv, there is no any epg to download from iptv!