←  [EN] Rytec XMLTV and EPG support

Forums

»

iptv epg

ocelot99's Photo ocelot99 17 Feb 2014

You can create epg.dat files with the epgimport program on a Windows PC (or on a Linux PC)

Install python on your PC, together with a couple of packages:

 

pywin32-218.win32-py2.7.exe
zope.interface-3.6.3.win32-py2.7.exe
python-2.7.4.msi
Twisted-13.0.0.win32-py2.7.msi

 

I would like to offload epg downloading to my PC. I tried the above and it works. Thank you.

 

However I need episode titles and this seems to put subtitle information into the description field meaning I won't have episode titles in my recording titles.

 

Is there a way to change that?

 

http://s7.directuplo...17/4yvt3ftd.jpg

Quote

doglover's Photo doglover 17 Feb 2014

We produce XMLTV files for enigma.  Enigma does only have 3 fields for data.  Title, subtitle and description.

So in the grabber we try to have all the infomartion into those three fields.  Like this:

 

  <programme start="20140217234000 +0100" stop="20140218002500 +0100" channel="ARD.de">
    <title lang="de">Geschichte im Ersten</title>
    <sub-title lang="de">[news] Geheimnisvolle Orte: Prora - Naziseebad und Sperrgebiet</sub-title>
    <desc lang="de">Es ist ein Denkmal des Größenwahns: Das 'KDF-Bad' in Prora auf Rügen. Hier sollte die 'Deutsche Volksgemeinschaft' entstehen: bedingungslose Gefolgschaft aus Dankbarkeit zu einem Führer, der seinem Volk einen herrlichen Urlaub ermöglichte. Hitler glaubte, nur mit erholten Arbeitern 'kann man wahrhaft große Politik machen'. Prora galt als kriegswichtiges Objekt - fertiggestellt wurde es nie. Mit Gründung der DDR begann die zweite, die unbekanntere, geheimnisvollere Geschichte Proras: Der Ort verschwand von der Landkarte und wurde militärisches Sperrgebiet. Die Nationale Volksarmee zog ein. 'Drei Worte genügen: nie wieder Rügen', so sagten die Soldaten. In dem Film erzählen Zeitzeugen, was sie mit diesem Ort verbinden. Lutz Stiller wurde in Prora zum Fallschirmjäger und Einzelkämpfer ausgebildet. Auf einer geheimen Baustelle, 20 Meter unter dem Meeresspiegel, legte der Bausoldat Andreas Ilse die Fundamente für den Hafen Mukran.</desc>
  </programme>
 

 

The subtitle is included in the subtitle field.

 

If you want this different, you have to configure your grabber to put the subtitle in the title field.

Or you edit the python program files to put the subtitle tag into the title field.   (I do not understand this python language).

 

Here my grab for your example:

 

 

  <programme start="20140218004500 +0100" stop="20140218021800 +0100" channel="ARD.de">
    <title lang="de">Tatort</title>
    <sub-title lang="de">[drama] Zirkuskind (Ep.900)</sub-title>
    <desc lang="de">Der kleine Familienzirkus Burani verzaubert bei seinem Gastspiel in Ludwigshafen das Publikum jeden Alters. Doch als einer der Mitarbeiter am Morgen nach der Vorstellung erschlagen in der Manege liegt, wird Lena Odenthal mit der harten Realität des Zirkuslebens konfrontiert. Patriarchin Lousiana schert sich wenig um den Tod von Pit. Sie hat genug damit zu tun, das Überleben ihres kleinen Unternehmens zu sichern und ihre Tochter Felicitas bei der Stange zu halten. Außerdem traute sie Pit nicht über den Weg. Tatsächlich vermuten Lena und Kopper, dass Pit und sein Bruder Robbi den Winteraufenthalt in Tunesien nutzten, um Schmuggel zu betreiben. Nicht mit Drogen, das steht fest. Die Kommissare machen sich auf die Suche nach dem unbekannten Schmuggelgut. Noch wichtiger aber ist die Frage, ob noch weitere Zirkusmitarbeiter in die Sache verwickelt waren - oder ob Pit und Robbi sich mit ihrer Geldbeschaffungsmethode grausame Feinde von außerhalb gemacht haben ..
Till Endemann
Andreas Hoppe.</desc>
  </programme>
 

and how it looks in enigma:

 

 

Willy

Attached Files

  • Attached File  ARD.jpg   234.16KB   21 downloads

Edited by doglover, 17 February 2014 - 14:13.
Quote

ocelot99's Photo ocelot99 17 Feb 2014

Ok. I misunderstood believing you created this EPGpython offline importer.

 

I don't have any gripe with your xmltv files. The three fields are fine by me.

 

I will look a these EPGpython scripts but since I'm clueless I don't see much chance.

 

Thank you.

 

Quote

ocelot99's Photo ocelot99 17 Feb 2014

I suspected something to be wrong with these scripts. But running EPGImport files (on PC) from an openpli box which produces these subtitles just fine (like your screenshots) gives the same results.

 

So it's the image then and it's just OE2 (using different background colors for different boxes).

 

Weird they wouldn't handle subtitles the same way.

Quote

proline's Photo proline 13 Oct 2014

I have just epg.dat myself trying to produce.
And got the error.

[XMLTVConverter] Bad start/stop time: 20141019054500 +0200 (1413690300) - 20141019054500 +
0200 (1413690300) [Knowing]
Unknown channel:  MTV.ch
Unknown channel:  iMusic1.de
Unknown channel:  RiC.de
Unknown channel:  [gen_xmltv] Error: 'ascii' codec can't encode character u'\x86' in posit
ion 0: ordinal not in range(128)
Traceback (most recent call last):
  File "C:\EPGpython\gen_xmltv.py", line 34, in iterator
    for r in xmltv_parser.enumFile(fd):
  File "C:\EPGpython\xmltvconverter.py", line 71, in enumFile
    print>>log, "Unknown channel: ", channel
  File "C:\EPGpython\log.py", line 22, in write
    logfile.write(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\x86' in position 0: ordinal no
t in range(128)
[EPGImport] imported 78800 events
[EPGImport] no Oudeis patch, load(.\epg_new.dat) required
reactor stopped
Done, data is in .\epg_new.dat
[EPGImport] #### Finished ####

c:\EPGpython>

What should it mean?
Or not so bad?

Quote

doglover's Photo doglover 14 Oct 2014

Unknown channel:  [gen_xmltv] Error: 'ascii' codec can't encode character u'\x86' in position 0: ordinal not in range(128)

 

 

Think you a special character in your channels file.  I know that the importer cannot handle some of the é, è, ü, ö etc characters.

I am avoiding them in the channels file. 

 

f.i.

 

<channel id="MDRThuringen.de">1:0:1:bbb:3:601:ffff0000:0:0:0:</channel> <!-- MDR ++CABLE++ -->

 

This should really be:

 

<channel id="MDRThüringen.de">1:0:1:bbb:3:601:ffff0000:0:0:0:</channel> <!-- MDR ++CABLE++ -->

 

But when I use this, I get a similar error.

 

Wllly


Edited by doglover, 14 October 2014 - 08:01.
Quote

proline's Photo proline 14 Oct 2014

Hmmm it's strange. I have no special characters in my channell file.
what could be more
?

Attached Files

Quote

doglover's Photo doglover 15 Oct 2014

Found it.

 

My conclusion about the special character was correct.  Only it is not in the channels file, it is in the XMLTV file.

 

The offending line is:  <channel id="†WeltDerWunder.de‡">

 

I must have made a incorrect paste somewhere.  I will figure out how this happened and correct it.

 

Willy

Quote

doglover's Photo doglover 15 Oct 2014

Corrected and tested.

Error is gone.

 

I have also uploaded the corrected file to the servers.

You can give it a go.

 

Willy

Quote

proline's Photo proline 15 Oct 2014

Yes!

Now is all okay

many thanks.

Quote

smel3's Photo smel3 21 Oct 2014

thanks

Quote

avp3's Photo avp3 8 Feb 2015

You can create epg.dat files with the epgimport program on a Windows PC (or on a Linux PC)

Install python on your PC, together with a couple of packages:

 

pywin32-218.win32-py2.7.exe
zope.interface-3.6.3.win32-py2.7.exe
python-2.7.4.msi
Twisted-13.0.0.win32-py2.7.msi

 

Use google to find them on the net.  (That is way I found them).

 

Then unzip the attached zip file to a dir on your PC.

 

Now open poland.sources.xml and edit the file to suit your needs.  Change the channels file posisition and name and the name and position of the data file

Save the file.

 

Now run from the command line (in the dir you placed the unzipped package):

 

OfflineImport.py  poland.sources.xml

 

An epg.dat file will be created in the same dir.

 

Willy

 

 

Thank you. This is a good way for EPG programming.

Quote

maigais's Photo maigais 30 Nov 2015

common such errors,
which may be ???

Attached Files

Quote

doglover's Photo doglover 30 Nov 2015

Unknown channels is EPG which cannot be linked to a channel.  Either no service ref is defined, or the defined service ref is not present on your receiver (in lamedb)

 

The ubyte error:  I see these also, but I never could determine what the error meant.

But I do not see any errors in the import (missing shows f.i. - gaps in the schedule).  So I just ignore this error.

Although I would like to know what it is.

 

Willy

Quote

maigais's Photo maigais 30 Nov 2015

Errors are much "importEvents",
behold from this xmltv


http://epg.giclub.tv...xmltv-ru.xml.gz
Edited by maigais, 30 November 2015 - 12:53.
Quote

proline's Photo proline 21 Mar 2016

Have tried tinker. Unfortunately unsuccessful.

 

C:\Users\Proline>cd c:/EPGpython

c:\EPGpython>OfflineImport.py rus.sources.xml
[EPGImport] oudeis patch not detected, using epg.dat instead.
[EPGImport] failed to load C implementation, sorry
[EPGImport] nextImport, source= Main
[EPGImport] afterDownload c:/EPG/ready/xmltv.xml.gz
[EPGImport] afterChannelDownload None
[EPGImport] Parsing channels from 'c:/EPG/ready/channels.xml.gz'
Traceback (most recent call last):
  File "C:\EPGpython\OfflineImport.py", line 68, in <module>
    importFrom(epgimport, xml)
  File "C:\EPGpython\OfflineImport.py", line 54, in importFrom
    epgimport.beginImport(longDescUntil = time.time() + (5*24*3600))
  File "C:\EPGpython\EPGImport.py", line 111, in beginImport
    self.nextImport()
  File "C:\EPGpython\EPGImport.py", line 120, in nextImport
    self.fetchUrl(self.source.url)
  File "C:\EPGpython\EPGImport.py", line 126, in fetchUrl
    self.afterDownload(None, filename, deleteFile=False)
  File "C:\EPGpython\EPGImport.py", line 191, in afterDownload
    self.afterChannelDownload(None, None)
  File "C:\EPGpython\EPGImport.py", line 210, in afterChannelDownload
    self.iterator = self.createIterator(filename)
  File "C:\EPGpython\EPGImport.py", line 129, in createIterator
    self.source.channels.update(self.channelFilter, filename)
  File "C:\EPGpython\EPGConfig.py", line 77, in update
    self.parse(filterCallback, self.urls[0])
  File "C:\EPGpython\EPGConfig.py", line 63, in parse
    ref = ref.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u0412' in position 14: ordinal not in range(256)

c:\EPGpython>

 

what am I doing wrong?


Edited by proline, 21 March 2016 - 12:06.
Quote

WanWizard's Photo WanWizard 21 Mar 2016

You try to import a file that the importer thinks is in latin-1, but it contains unicode characters, so it's probably in utf-8.

Quote

proline's Photo proline 21 Mar 2016

the problem is determined in my channels.xml
But where really? I do not find

 

Attached Files

Quote

proline's Photo proline 21 Mar 2016

I have found!!!
I apologize :) :)

Quote

proline's Photo proline 21 Mar 2016

Another question. I have in my xml file such tags

    <title lang="ru">Лига справедливости: Война</title>
    <desc lang="ru">Произведено: США. В Готэм-Сити начинает происходить серия загадочных похищений. Жители города обеспокоены происходящим, ведь на записях городских видеокамер видно, что людей похищает кто-то очень похожий на Бэтмена. Однако на самом деле планете угрожает вторжение инопланетной расы Дарксайд. Супер-герои формируют Лигу справедливости,чтобы спасти планету от уничтожения.</desc>
    <category lang="ru">Детский</category>
    <credits>
      <director>Джей Олива</director>
      <actor>Шемар Мур</actor>
      <actor>Джейсон О&#39;Мара</actor>
      <actor>Алан Тьюдик</actor>
      <actor>Шон Эстин</actor>
      <actor>Зак Каллисон</actor>
      <actor>Кристофер Горам</actor>
      <actor>Джастин Кирк</actor>
      <actor>Мишель Монахэн</actor>
    </credits>
    <date>2014</date>

After overpacking in epg.dat they are gone. It remains only the description without actors and director.

Is it possible to fix this bug?

Quote