I've been doing a lot of work on my EPG program, and i wanted to share a discovery i made today.
I build the XML formatted file myself. The XML is formatted in XMLTV format for EPG data.
Well, during programming, i came upon a quark i didn't expect. I was building my XML file grouped by DAY, rather then CHANNEL for a particular source. So, the outputted XML file would list all the channels and programs for one day, and then list all the channels and programs for the next day and so on. Utilizing the EPGimport plugin on the Enigma2 STB, i realized that it was only showing EPG data for the last date in the xml file, missing all earlier dates. Come to figure out, that something doesn't like channel data separated. If you move on to another channel, and then back to an existing channel, the earlier channel data is tossed. So, it requires the XML data to be grouped by channel ID. -- This might be a limitation of the EPGimport or a mandatory XMLTV format specification. Either way, i needed to create a fix.
I wrote a function that runs through the EPG array (before writing the xml file) and re-group the ARRAY by channel ID rather than date. A sort function so to speak. I then rebuilt the XML file with my GroupByID function called first and the EPGimport plugin ran flawlessly showing all EPG data inclusive of all dates.
I build the XML formatted file myself. The XML is formatted in XMLTV format for EPG data.
<programme start="20230205130000 -0500" stop="20230205140000 -0500" channel="CoziTV">
<title lang="en">Little House on the Prairie</title>
<desc lang="en">A Harvest of Friends : [TVPG:60 Min]</desc>
</programme>
Well, during programming, i came upon a quark i didn't expect. I was building my XML file grouped by DAY, rather then CHANNEL for a particular source. So, the outputted XML file would list all the channels and programs for one day, and then list all the channels and programs for the next day and so on. Utilizing the EPGimport plugin on the Enigma2 STB, i realized that it was only showing EPG data for the last date in the xml file, missing all earlier dates. Come to figure out, that something doesn't like channel data separated. If you move on to another channel, and then back to an existing channel, the earlier channel data is tossed. So, it requires the XML data to be grouped by channel ID. -- This might be a limitation of the EPGimport or a mandatory XMLTV format specification. Either way, i needed to create a fix.
I wrote a function that runs through the EPG array (before writing the xml file) and re-group the ARRAY by channel ID rather than date. A sort function so to speak. I then rebuilt the XML file with my GroupByID function called first and the EPGimport plugin ran flawlessly showing all EPG data inclusive of all dates.