Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £129! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £179! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[VU+ Duo2] Is it possible to clear EPG data before XMLTV Import

Carceri

New member
Joined
Apr 22, 2015
Messages
3
Reaction score
0
Points
0
I am using XMLTV Import to get my EPG data, but unfortunately I have a couple of channels that move programs around plus/minus 5 minutes during the week. This results in duplicate entries in the EPG since the old EPG daga from a previous import is merged with the new.

I can resolve this by clearing EPG data before I update using XMLTV Importer, but this does not work with a scheduled import.

Is there any way to automate deleting EPG data before doing a new import? If not, maybe this could be added as an option to XMLTV Import?

I can see in the source code that the following lines are responsible for flushing the cache, but they are only called when you manually select "Delete EPG" from the menu.

from enigma import eEPGCache
epgcache = eEPGCache.getInstance()
epgcache.flushEPG()
 
yes I like to know this too, having the same problems with the Belgian channels
 
Menu -> Setup -> System -> EPG -> Load/Save/Delete -> Delete EPG -> yes

That will clear the EPG cache and delete the epg.dat file.
 
Menu -> Setup -> System -> EPG -> Load/Save/Delete -> Delete EPG -> yes

That will clear the EPG cache and delete the epg.dat file.
OP want's to be able to do it automatically before xmltv import rather than manually per method you mentioned.

Does anyone know if CrossEPG is opensource or not? It's on github now I believe but it's still copyrighted that I can see or is copyright from the older days?
 
Maybe it could be included as automated, but not default.
 
I was going to see if I could include it in code but it would always do it so it would have to be a modded crossepg. If it did work, that is.

This is why I need to find out if CrossEPG is opensource.
 
If we cannot modify XMLTV Importer to do this, would it be possible to have a command line interface to clear the EPG cache, so one can schedule it with cron a minute or so before the import?
 
If we cannot modify XMLTV Importer to do this, would it be possible to have a command line interface to clear the EPG cache, so one can schedule it with cron a minute or so before the import?
I can do a quick script which you can then get cron timer to run just before epg is set to download.

The problem is epg data is held in memory so deleting it whilst box is on wouldn't probably do much because epg data held in memory is then written back to epg file when off/standby.

Do you normally have your box on standby during the time this would be done?
 
Doesn't matter if the box is in standby, the epg cache is still in the RAM. If you write it as a plugin people wont need to play with external files and cron jobs. The whole reason I added the EPG delete feature to E2 was so people didn't need to sleep the box and restart it when their EPG became corrupt.
 
Last edited:
Doesn't matter if the box is in standby, the epg cache is still in the RAM. If you write it as a plugin people wont need to play with external files and cron jobs. The whole reason I added the EPG delete feature to E2 was so people didn't need to sleep the box and restart it when their EPG became corrupt.
I don't have knowledge to write in python as a plugin really plus OP wants it done automatically before crossepg downloads epg data again so that means either setting a cron timer or coding it so epg data is deleted itself before epg data is downloaded again.
 
The only way to do it with a script is stop E2, delete the file, and restart E2.

But that is not safe to do as an automated process because could break recordings, etc.
 
No need to do so before a Cross-Opent TV import; old data will be neatly overwritten when changes have occurred.

If you use the XMLTV import plugin (better not use Cross for that) there is indeed the possibility that events are in multiple times, because a changed event isn't recognised as such.
 
No need to do so before a Cross-Opent TV import; old data will be neatly overwritten when changes have occurred.
What happens when EIT data conflicts with OpenTV data? Which wins? Or Freesat EPG conficts with OpenTV?
 
Probably double entries as well. But that will then happen anyway, as soon as new EIT/Freesat data comes in when tuned to a station.

But to be honest: I use Cross for Open-TV and XMLTV-importer for the rest of the world, plus I have EIT, Freesat etc all enabled, and I see seldom (if ever) double entries.
 
I'll look into writing a plugin when I get the time. I know Python, just need to check how to write a plugin.
 
I'll look into writing a plugin when I get the time. I know Python, just need to check how to write a plugin.

old post but how did you get on with this? Ive created a plugin to delete the epg.dat but now looking at adding it to crossepg. Ive no specific reason for this but I like playing around with my box while bored lol

this is what i have in my plugin.py

Code:
def main(session, **kwargs):
    import os
    if os.path.exists('/media/hdd/epg.dat'):
	
        os.remove('/media/hdd/epg.dat')

ill need to add elsif as well for usb and sd
 
Last edited:
@dsayers, deleting epg.dat doesn't delete the epg. You need to clear the epg cache too like the built in function in openvix does.
 
Good point, which is often forgotten: EPG is held in memory (RAM), the file epg.dat is only a kind of 'hibernation file'. So to really get rid of all date you must delete both, which is indeed what the embedded function in ViX does.
 

OpenViX Feeds Status

Back
Top