run epg import from command line - Open ATV 6.4

jfish

VIP Member
VIP Member
Joined
Sep 21, 2007
Messages
3,204
Reaction score
699
Using Open ATV 6.4

can I run the epg import from command line (Telnet)
 
Not my work and since you can set it up to import on a certain day and time im not about to try it im not sure why you would want to.

All credit to the Rytec EPG Team


There is a way to start the epgimport from the command line. However it is not straightforward.

First you have to create a custom sources.xml files (like the one listed here - benl.sources.xml) for the package you want t import. Do not use the rytec.sources.xml file because if you use this in the next step everything will be imported, which wlll take forever, or even crash your box.

I placed this file in /etc/epgimport/ but it can be everywhere.



<?xml version="1.0" encoding="latin-1"?>
<sources>
<channel name="rytec.channels.xml.gz">
<url>http://rytec.sifteam.eu/rytec.channels.xml.gz</url>
<url>http://xmltvepg.wanwizard.eu/rytec.channels.xml.gz</url>
<url>http://enigma2.world-of-satellite.com/epg_data/rytec.channels.xml.gz</url>
<url>http://www.xmltvepg.nl/rytec.channels.xml.gz</url>
<url>http://www.tm800hd.co.uk/rytec.channels.xml.gz</url>
<url>http://www.vuplus-community.net/rytec/rytec.channels.xml.gz</url>
<url>http://www.ebook-directory.net/rytecxmlepg/rytec.channels.xml.gz</url>
</channel>

<source type="gen_xmltv" channels="http://enigma2.world-of-satellite.com/epg_data/rytec.channels.xml.gz">
<description>Rytec Benelux XMLTV</description>
<url>http://rytec.sifteam.eu/rytecxmltvbenl.gz</url>
<url>http://xmltvepg.wanwizard.eu/rytecxmltvbenl.gz</url>
<url>http://enigma2.world-of-satellite.com/epg_data/rytecxmltvbenl.gz</url>
<url>http://www.xmltvepg.nl/rytecxmltvbenl.gz</url>
<url>http://www.tm800hd.co.uk/rytec/rytecxmltvbenl.gz</url>
<url>http://www.vuplus-community.net/rytec/rytecxmltvbenl.gz</url>
<url>http://www.ebook-directory.net/rytecxmlepg/rytecxmltvbenl.gz</url>
</source>


</sources>

In /usr/lib/enigma2/python/Plugins/Extensions/EPGImport/ give the file OfflineImport.py 755 attributes.

You can run now from the command line the import with the command:

/usr/lib/enigma2/python/Plugins/Extensions/EPGImport/OfflineImport.py /etc/epgimport/benl.sources.xml

This will create a epg_new.dat file on our HDD or CF or USB-stick (depending what you have).

The program uses the python importer, so its slow.

After the programm finsishes you will see in the telnet window:

[EPGImport] ### thread is ready ### Events: 213449
[EPGImport] imported 213449 events
[EPGImport] no Oudeis patch, load(/media/hdd/epg_new.dat) required
Done, data is in /media/hdd/epg_new.dat
[EPGImport] #### Finished ####

Since the program uses the epg.dat method. An enigma restart is needed to load the data.

In order to do this:

In telnet use the commands:

init 4 - to stop enigma

delete now the epg.dat file

copy the epg_new.dat file to the position of the old epg.dat fle.

Rename thsi copy to epg.dat

init 3 - start enigma again.

The new epg wll be loaded now.



Willy
 
Back
Top