EPG Contamination Fix

el bandido

TNAP-Images
Administrator
The enigma2 epg was designed to provide epg from providers, such as DishNet, DirectTV, Bell. Sky....etc. The providers do not reuse SID, ONID, TSID. On FTA channels that are not set by a provider in North America, it is common to see the same SID, ONID, TSID on many channels. This is fine, and does not hurt a thing until you add something like epg to the mix.

Consider the format of these channels:
Satellite = 127.0W C-band Galaxy 37/Horizons 4 127.1 W
DVB-S2 16APSK 4040V / 32501 / 3/4' > Tp# 1
AND
Satellite = 101.0W C-band T9S/T16 & SES 1 101.1 W
DVB-S 4179H / 30001 / 5/6' > Tp# 1
Receiver = SF8008-Supreme (Note: The receiver model does not really matter as this problem will be shared amongst all enigma2 receivers.)

127w, 4040V SID 0x01 1:0:1:1:1:0:9198FC8:0:0:0: Shows epg for Mannix (Incorrect, Contamination)
101w, MeTV ET HD 1:0:1:1:1:0:A1D1053:0:0:0: Shows epg for Mannix (Correct)
127w, 4040V SID 0x02 1:0:1:2:1:0:9198FC8:0:0:0: Shows epg for Numbers (Incorrect, Contamination)
101w, Heroes ET SD 1:0:1:2:1:0:A1D1053:0:0:0: Shows epg for Numbers (Correct)
127w, 4040V SID 0x03 1:0:1:3:1:0:9198FC8:0:0:0: Shows epg for The Drew Barry show (Incorrect, Contamination)
101w, Start ET SD 1:0:1:3:1:0:A1D1053:0:0:0: Shows epg for The Drew Barry Show (Correct)
127w, 4040V SID 0x04 1:0:1:4:1:0:9198FC8:0:0:0: Shows epg for The Selection (Incorrect, Contamination)
101w, Story ET SD 1:0:1:4:1:0:A1D1053:0:0:0: Shows epg for The Selection (Correct)
All of the channels shown above have the same SID, ONID, TSID.
Enigma2 populates epg by what is shown above in bold.

This is the format EPGImport requires in order to import epg:
<channel id="metv_et_hd">1:0:1:1:1:0:A1D1053:0:0:0:</channel>
1:0:1:1:1:0:A1D1053:
EPGImport populates epg by what is shown above in bold.

The fix is to add the namespace or A1D1053: as an example to enigma2. Doing this will stop the fake epg, cross contamination or whatever else you want to call it.

But this is easier said than done because of the way enigma2 is setup. Anyway, Claude Code pulled it off, but coding this properly took some time expressed in hours instead of minutes. The results are Great though, Look at the before and after screenshots shown below.

Before EPG Fix:
epg-contamination.webp

After EPG Fix:
epg-no-contamination_20250902161523.webp


Now we can import EPG from any source and have the EPG Only On The Channels That it is Supposed to be On!

ATSC EPG:
epg-ATSC_20250902174600.webp

Weigel EPG, 101w:
epg-101w_20250902174734.webp

Claude Code was a tremendous help with this. He operates within your file system, and can make edits or insertions at light speed. Unfortunately, Claude Code cannot do projects like this one by himself (yet). A lot of times, the main problem with Claude Code is getting him to understand exactly what you are trying to do. Sounds easy enough, right? Not always....

The United States and North America are not the only ones having this problem. Once a solution for improvement is found, most of the time it is not easy to get other image groups to adopt your solution. Anyway, Claude's documentation to apply this to other image builds is attached.
 

Attachments

Last edited:
To go a bit further, All of the epg data for the fta receiver is heavily compressed into a file named epg.dat. This file can reside at different places in the receiver. A technical document written by Claude Code explaining the epg.dat file in great detail is attached.
 

Attachments

Finally we have what the end user would need to do. Let's be clear on what is happening:
We are transitioning from 3-field EPG cache keys:** SID + ONID + TSID to 4-field EPG cache keys:** SID + ONID + TSID + DVB_NAMESPACE.
Someone that does not use epg at all would simply do nothing!

Attached is a file aimed directly at the user on how to make this epg transition. In a nutshell:
(1) Stop enigma2. Find and delete epg.dat file. REBOOT, RELOAD EPG.

OR

(2) Make a completely clean image install. (No settings restored). RELOAD EPG
 

Attachments

Last edited:
Deleted ALL epg.dat files and uninstalled epgimport in plugins extensions. Did reboots.

Then installed..... enigma2-plugin-skins-xDreamy_6.2.0_all.ipk and TNAP-6-sf8008-20250903_multiboot.zip and reactivated epgimport
 

Attachments

  • 1.webp
    1.webp
    94.7 KB · Views: 11
  • 2.webp
    2.webp
    196 KB · Views: 11
Excellent! (Any Skin that shows epg Will Work!)
Look and see if the epg is populating where it should not. All of that should be fixed now. Looks like a great success!
 
Deleted ALL epg.dat files and uninstalled epgimport in plugins extensions. Did reboots.

Then installed..... enigma2-plugin-skins-xDreamy_6.2.0_all.ipk and TNAP-6-sf8008-20250903_multiboot.zip and reactivated epgimport
can't find "ALL epg.dat files" ! where are they ?
thx.
 
My sf8008 has it in /media/hdd.

For a better cleaning option, use Filezilla and go to root directory. Then select server>search remote files>root dir
and search for epg.dat. Should find anything named epg.dat.
 
Back
Top