• XMLTV
  • EPG changes are impossible to update

I use the XMLTV socket to load my EPG. When programming in the EPG changes, TVHeadend refuses to accept the new data and instead retains the old EPG data. I setup the file grabber instead and gave it a higher priority than the socket and TVHeadend still refuses to update to the new data.
The only way I've found is to stop TVHeadend, delete the EPG database, start TVHeadend, load XMLTV data. This doesn't seem like it should be the intended behavior. Is this a bug? Any ideas?
Thanks.

I've tried so much.
I went to:
Channel / EPG > EPG Grabber Channels
I found the channels in question and delete them. I push my new XML file to the socket and the channels come back as expected, BUT WITH THE OLD DATA! I'm losing my mind!
I could make a script to kill TVHeadend, delete the DB, start TVH then push the XML to socket... But that seems really dumb.

Is it possible a bug was introduced that prevents updates to EPG data?

Sometimes less is more:
Channel / EPG /EPG Grabber MODULES
Enable: External: XMLTV
download your xml file someplace
cd: to where ever you DL
cat YOUR.xml | socat - UNIX-CONNECT:/home/THE_USER/.hts/tvheadend/epggrab/xmltv.sock

  • C M replied to this.

    That is exactly how I use EPG. It does work but there seems to be a bug that I'd like to report. The workflow is as follows:
    cat YOUR.xml | socat - UNIX-CONNECT:/home/THE_USER/.hts/tvheadend/epggrab/xmltv.sock
    edit YOUR.xml with changes to programming then again run to update TVHeadend with the changes:
    cat YOUR.xml | socat - UNIX-CONNECT:/home/THE_USER/.hts/tvheadend/epggrab/xmltv.sock

    TVHeadend keeps the first data and under no circumstance I can find will update the EPG with new data without killing TVH deleting the DB, starting TVH, then pushing the XML again.

    joe blow
    If you could test to confirm it would be helpful. run "cat YOUR.xml | socat - UNIX-CONNECT:/home/THE_USER/.hts/tvheadend/epggrab/xmltv.sock" as you said, then change something in "YOUR.xml" then again run "cat YOUR.xml | socat - UNIX-CONNECT:/home/THE_USER/.hts/tvheadend/epggrab/xmltv.sock"
    Now check to see if TVHeadend has the old data or accepted the changed data.

    NAH, don't need to change the guide data, but go ahead and change yours, then wonder why it doesn't work

    • C M replied to this.

      joe blow
      That's exactly where I am, wondering why it doesn't work. Have I said something to offend you? I hoped for help but didn't expect it. I REALLY didn't expect to be trolled on the TVHeadend support forum though.

        C M what is the source of your broadcast channels.

        • C M replied to this.

          Jonas Lang
          It's an IPTV m3u.
          The guide data for some of the channels get updated occasionally, I realize that might be unusual. I would assume TVHeadend just isn't capable of updating data it already has but the following setting leads me to believe it is supposed to work:
          "EPG update window : Maximum allowed difference between event start time when the EPG event is changed (in seconds)."
          That implies to me that an event can be changed but in practice, I can't get it to work.

            C M is it an m3u supplied by an actual provider or one of those random m3u lists that are found on the web.

            You’ve provided very little information about your setup but in the absence of this I’m guessing you’ve possibly got duplicate TVH configuration settings in another location and your current TVH install is pointing to a different folder.

            I’m not sure if you’ve compiled TVH yourself or installed it from a pre built package but you may want to clear down all traces of TVH and start afresh.

            It is an m3u that I made and it seems to parse properly into channels. The XMLTV Extrenal Socket is also working, after I kill TVH and remove the EPG DB, I start TVHeadend and there's no data. Then I use the command that 'joe blow' referenced and the data populates to the EPG in TVH as expected. The only issue is that when TVH has a program set at a time, it refuses to change that programing if the XMLTV file changes.
            It is in docker and there is only one instance.
            2024-09-15 17:51:53.136 [ INFO] xmltv: xmltv: grab took 2 seconds
            2024-09-15 17:51:53.898 [ INFO] xmltv: xmltv: parse took 0 seconds
            2024-09-15 17:51:53.898 [ INFO] xmltv: xmltv: channels tot= 1603 new= 0 mod= 4
            2024-09-15 17:51:53.898 [ INFO] xmltv: xmltv: brands tot= 0 new= 0 mod= 0
            2024-09-15 17:51:53.898 [ INFO] xmltv: xmltv: seasons tot= 22 new= 22 mod= 0
            2024-09-15 17:51:53.898 [ INFO] xmltv: xmltv: episodes tot= 1 new= 1 mod= 0
            2024-09-15 17:51:53.898 [ INFO] xmltv: xmltv: broadcasts tot= 2538 new= 2139 mod= 3

            "mod=3" seems like it should be the three updated (modified?) channels but I'm not seeing the changes reflected in the TVHeadend UI or in clients.

            Thanks! Open to suggestions. I'm going to go through the logging options to see if I can find anything helpful, I will report back if I find a solution.

            @Carlos Medrano - Exactly which EPG field(s) are you changing via XMLTV?
            Rather than deleting the EPG database, have you tried just restarting TVH?
            Also, what happens if you do a browser refresh on the EPG screen? Does the EPG update?

            I'm not sure if this is related, but I have been working on a yet unpublished XMLTV change. I found that when I updated an EPG entry via XMLTV, it often failed to fire an EPG change event, although a manual refresh would show that the data had been changed.

            As it currently stands, TVH can only 'update' EPG entries for a channel via XMLTV if the start/stop match. If the start/stop change, the EPG entry is deleted and rewritten.