DVBViewer community forum: Xepg - DVBViewer community forum

Jump to content

-

  • (33 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Xepg Auto Import XMLTV

#1 User is offline   Delphi 

  • DVBViewer Junkie
  • PipPipPipPip
  • Group: Senior Members
  • Posts: 305
  • Joined: 31.March 06

Posted 29 August 2007 - 17:38

Hi,


I have started to program a new input plugin for automatic XMLTV import.
I will do the channel mapping (pairing) as well.

Is it a good idea to support multiple XMLTV (*.xml) files to import?
i.e. files grabbed with different grabbers or with different setups of the same grabber.


I would like to have a look at some real life XML TV guides:

8 first lines. Like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<tv generator-info-name="TVGGV2">
  <channel id="02000.DR1">
	<display-name>DR 1</display-name>
  </channel>
  <channel id="02001.DR2">
	<display-name>DR 2</display-name>
  </channel>

Some typical (or problematic) </programme> fields including as many formatting codes and subfields as your grapper can produce. Like this:
</programme>
  <programme start="20070830081500" stop="20070830083000" channel="02000.DR1">
	<title>Klassen 1. b</title>
	<desc>Klassen er til fastelavnsfest. De skal slå katten af tønden uden at få ondt i armen. Hvor på tønden er det smartest at slå? Og hvilken klasse bliver kåret som den bedst udklædte klasse på skolen?</desc>
	<episode-num system="xmltv_ns">.6.</episode-num>
</programme>
  <programme start="20070903070000" stop="20070903071500" channel="02000.DR1">
	<title>Charlie & Lola</title>
	<sub-title>Tegnefilm.</sub-title>
	<desc>Jeg elsker sne.</desc>
</programme>
  <programme start="20070902220500" stop="20070903005500" channel="02000.DR1">
	<title>Dogville</title>
	<sub-title>Lars von Triers drama fra 2003.</sub-title>
	<desc>Den smukke Grace er på flugt fra gangstere og ankommer til den lille isolerede bjergby Dogville. Med lidt hjælp fra byens forfatterspire Tom tilbyder indbyggerne at skjule Grace, som til gengæld skal arbejde lidt for alle. Da politiet starter en eftersøgning af Grace, kræver alle i byen, især mændene, sig langsomt bedre og bedre betalt for risikoen ved at skjule hende. Grace erfarer, at den godhed, hun har fundet i Dogville, må betragtes som relativ. Men Grace gemmer på en hemmelighed, der bliver skæbnesvanger for hende selv - og for de gode borgere i Dogville. Medvirkende: Grace: Nicole Kidman, Tom Jr: Paul Bettany, Thomas Sr: Philip Baker Hall, Chuck: Stellan Skarsgård og Vera: Patricia Clarkson. Instruktion: Lars von Trier.</desc>
	<audio>
	  <stereo>stereo</stereo>
	</audio>
  </programme>


If a subfield is not supported by DVBViewer it could be possible to move the information to the description/title field.
i.e. Klassen 1. b --> Klassen 1. b (6)

So please add (like above) some snippets in this tread (NOT whole guides, please!).

If the snippet contains formatting codes it is better to upload as an attached file. This site interprets the formatting codes, which is not wanted.

Thanks in advance

#2 User is offline   extremeno 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 35
  • Joined: 12.April 07

Posted 12 September 2007 - 08:11

Thanks in advance for the work. The options available now clearly need improvement.

Here you are some Spanish sample. Will you need channels and programs in the right order like myXMLTV did?

<?xml version="1.0" encoding="utf-8"?>

<tv generator-info-name="KubycSystemImporter/v0.01" generator-info-url="http://www.kubycsystem.com/">

  <channel id="Antena3">

    <display-name lang="es">Antena 3</display-name>

    <display-name lang="es">3</display-name>

    <icon src="http://www.mundoplus.tv/imagenes/logos/a3.gif" />

    <url>http://www.inout.tv/SincroGuia/templates/prog.php</url>

  </channel>

  <channel id="cuatro">

    <display-name lang="es">CUATRO</display-name>

    <display-name lang="es">4</display-name>

    <icon src="http://www.mundoplus.tv/imagenes/logos/cuatro.gif" />

    <url>http://www.inout.tv/SincroGuia/templates/prog.php</url>

  </channel>



And some programs:


<?xml version="1.0" encoding="utf-8"?>
  <programme start="20070919123000 +0200" stop="20070919140000 +0200" channel="Antena3">

    <title lang="es">La ruleta de la suerte</title>

    <desc>Clásico concurso en el que tres participantes deben adivinar las letras correctas que forman una palabra o una frase con la ayuda de una ruleta que cuenta con 24 opciones. En su segunda etapa en Antena 3, la presentación del programa corre a cargo de Jorge Fernández.</desc>

    <category lang="es">Entretenimiento</category>

    <rating system="MPAA">

      <value>TP</value>

      <icon src="http://epg.kubycsystem.com/epg-data/G.PNG" />

    </rating>

  </programme>

  <programme start="20070919140000 +0200" stop="20070919150000 +0200" channel="Antena3">

    <title lang="es">Los Simpson</title>

    <date>1989</date>

    <desc>Los Simpson son una familia políticamente incorrecta, de clase media, que habita en la ficticia localidad norteamericana de Springfield. Groseros, vagos y desvergonzados, nacieron en 1987 como una sección de "El show de Tracey Ullman", donde aparecían cinco minutos en cada emisión. La sensacional acogida por parte del público exigió un espacio propio de media hora, que llegó dos años más tarde. Desde entonces, ya suman dieciocho temporadas en antena.
 : Su creador, Matt Groening, </desc>

    <category lang="es">Infantil / Dibujos/Animación</category>

    <rating system="MPAA">

      <value>TP</value>

      <icon src="http://epg.kubycsystem.com/epg-data/G.PNG" />

    </rating>

  </programme>




If you want to test the whole file, yo can get int at http://www.kubycsyst.../kubycguia.html. If you don't read Spanish or don't want to register in this site, I can put the files somewhere for you (they are big sized).

#3 User is offline   Delphi 

  • DVBViewer Junkie
  • PipPipPipPip
  • Group: Senior Members
  • Posts: 305
  • Joined: 31.March 06

Posted 13 September 2007 - 20:30

Thank you for the snippets. If typical they are good enough for now.

I am still working on the plugin, but that kind of things always take longer time than you expect :)

One question: Do you get the channels info and the programme info from 2 different files?

I don't need channels and program info in any specific order... I think (could be a matter of speed).
I am done with the channel pairing. Next step is to actually read the EPG into DVBViewer.

Maybe later I might want your EPG data and channels.dat

#4 User is offline   extremeno 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 35
  • Joined: 12.April 07

Posted 14 September 2007 - 14:04

View PostDelphi, on Sep 13 2007, 09:30 PM, said:

One question: Do you get the channels info and the programme info from 2 different files?

Maybe later I might want your EPG data and channels.dat


The channels and the programme are in the same file. You can get different files for different set of channels, but each file contains this two infos for each channel, tipically one channel tag at the beginning and many programme tags later.

When you download packed files, it's usual than you don't see all the channels it contains (i.e. local or regional ones), so the plugin should be able to ignore tags for unmmaped channels

I'm still in 3.6 version, so my epg.dat and channel.dat are slightly different from the latest release. Will your plugin also work with that version?

Thanks in advance

#5 User is offline   Delphi 

  • DVBViewer Junkie
  • PipPipPipPip
  • Group: Senior Members
  • Posts: 305
  • Joined: 31.March 06

Posted 16 September 2007 - 19:09

View Postextremeno, on Sep 14 2007, 03:04 PM, said:

The channels and the programme are in the same file. You can get different files for different set of channels, but each file contains this two infos for each channel, tipically one channel tag at the beginning and many programme tags later.


Thats what I expected. I will support import from multiple XMLTV files.

View Postextremeno, on Sep 14 2007, 03:04 PM, said:

When you download packed files, it's usual than you don't see all the channels it contains (i.e. local or regional ones), so the plugin should be able to ignore tags for unmmaped channels


I will only import EPG for channels defined in the <channel....> ....</channel> tags. Others will be ignored. Is that what you mean?

EDIT: Reading the XMLTV DTD:

http://xmltv.cvs.sourceforge.net/xmltv/xml...dtd?view=markup

Here is stated that the <channel> tags are optionally :) . So to be safe I have to read the whole file and put all the channels from <programme> tags to a list.
The not needed XMLTV channels can then be ignored during channel pairing. Should only be done once.




View Postextremeno, on Sep 14 2007, 03:04 PM, said:

I'm still in 3.6 version, so my epg.dat and channel.dat are slightly different from the latest release. Will your plugin also work with that version?


Should be no problem since I don't use the channels.dat and epg.dat files. I get/set all info via COM interface.

This post has been edited by Delphi: 16 September 2007 - 20:11


#6 User is offline   Spencer 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 18.June 07

Posted 17 September 2007 - 18:09

<?xml version="1.0" encoding="utf-8" ?>
<tv generator-info-name="TVxb/1.0106" generator-info-url="http://www.tvxb.com/">
<channel id="mnet.za">
<display-name>M-Net</display-name>
<display-name>3</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="mm1.za">
<display-name>mnetmovies1</display-name>
<display-name>4</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="mm2.za">
<display-name>mnetmovies2</display-name>
<display-name>5</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="actx.za">
<display-name>actionX</display-name>
<display-name>6</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="hlmk.za">
<display-name>Hallmark</display-name>
<display-name>8</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="tcm.za">
<display-name>TCM</display-name>
<display-name>9</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="go.za">
<display-name>go</display-name>
<display-name>10</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="ss1.za">
<display-name>SuperSport 1</display-name>
<display-name>21</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="ss2.za">
<display-name>SuperSport 2</display-name>
<display-name>22</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="ss3.za">
<display-name>SuperSport 3</display-name>
<display-name>23</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="ssu.za">
<display-name>SuperSport 4</display-name>
<display-name>24</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="ss5.za">
<display-name>SuperSport 5</display-name>
<display-name>25</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="ss6.za">
<display-name>SuperSport 6</display-name>
<display-name>26</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="ss7.za">
<display-name>SuperSport 7</display-name>
<display-name>27</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="ssm.za">
<display-name>SuperSport 8</display-name>
<display-name>28</display-name>
<url>http://www.supersport.co.za/default.asp</url>
</channel>
<channel id="espn.za">
<display-name>ESPN</display-name>
<display-name>33</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="ttrk.za">
<display-name>TellyTrack</display-name>
<display-name>34</display-name>
</channel>
<channel id="kynt.za">
<display-name>kykNET</display-name>
<display-name>35</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="mnts.za">
<display-name>M-Net Series</display-name>
<display-name>36</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="bbcp.za">
<display-name>BBC Prime</display-name>
<display-name>40</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="eent.za">
<display-name>E! Entertainment</display-name>
<display-name>41</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="zrel.za">
<display-name>Zone Reality</display-name>
<display-name>42</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="sabc1.za">
<display-name>SABC 1</display-name>
<display-name>46</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="sabc2.za">
<display-name>SABC 2</display-name>
<display-name>47</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="sabc3.za">
<display-name>SABC 3</display-name>
<display-name>48</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="etv.za">
<display-name>e-TV</display-name>
<display-name>49</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="bbcw.za">
<display-name>BBC Prime</display-name>
<display-name>50</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="cnn.za">
<display-name>CNN</display-name>
<display-name>51</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="sky.za">
<display-name>Sky News</display-name>
<display-name>52</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="sabca.za">
<display-name>SABC Africa</display-name>
<display-name>53</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="cnbc.za">
<display-name>CNBC Africa</display-name>
<display-name>54</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="sumt.za">
<display-name>Summit TV</display-name>
<display-name>55</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="blbg.za">
<display-name>Bloomberg</display-name>
<display-name>56</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>
</channel>
<channel id="parl.za">
<display-name>Parliamentary Service</display-name>
<display-name>58</display-name>
<url>http://www.mnet.co.za/schedules/default.asp</url>
</channel>
<channel id="eunw.za">
<display-name>Euro News</display-name>
<display-name>61</display-name>
</channel>
<channel id="alja.za">
<display-name>Al Jazeera</display-name>
<display-name>62</display-name>
</channel>
<channel id="dscy.za">
<display-name>Discovery Channel</display-name>
<display-name>65</display-name>
<url>http://www.dstv.com/dstv_guide/print.aspx</url>


Hi Guys,

I have been battling with this since I got DVB Viewer.
There are guys in South Africa which provide the XMLTV file but when I try and import it using the plug-in it does not show up the XMLTV data just the channel.dat data.

Please can you advise me on how to do this. The file can be downloaded from http://sa-mce.com/files/.
I am a newbiw at all this, so would really appreciate the help !

Thanks,

Spencer

#7 User is offline   Delphi 

  • DVBViewer Junkie
  • PipPipPipPip
  • Group: Senior Members
  • Posts: 305
  • Joined: 31.March 06

Posted 24 September 2007 - 15:38

If I remember right, the myXMLYV.exe don't like the encoding='utf-8' in the first line of your file.
Maybe you can change this in your grabber settings.
I have encoding='ISO-8859-1'.

Another tip, which sometimes work (don't know why), is to delete the files epg.bak and epg.dat in the DVBViewer config folder:
In DVBViewer select About --> Config file folder. Close DVBViewer. Delete the files.

I am still working on my plugin, but have decided to make it not a plugin (DLL) (gets too complicated for a plugin) but an external exe

Hopefully this will solve your problems. But it takes time!!

This post has been edited by Delphi: 25 September 2007 - 00:08


#8 User is offline   redina 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 13
  • Joined: 15.May 06

Posted 04 October 2007 - 21:12

Thanks in advance from me to. (Sweden)

<?xml version='1.0' encoding='iso-8859-1'?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">
<tv>
  <channel id="disneychannel.se">
	<display-name lang="sv">Disney Channel</display-name>
	
	<icon src="http://xmltv.tvsajten.com/chanlogos/disneychannel.se.png"/>
  </channel>
  <channel id="eurosport.com">
	<display-name lang="sv">Eurosport</display-name>
	
	<icon src="http://xmltv.tvsajten.com/chanlogos/eurosport.com.png"/>
  </channel>


  <programme start="20071006174500 +0200" stop="20071006185000 +0200" channel="kanal9.se">
	<title lang="sv">Red Bull Air Race</title>
	<desc lang="sv">Red Bull Air Race World Series är flygets formel 1. Ett våghalsigt och halsbrytande race i luften. Akrobatpiloter av absolut världsklass kämpar om vem som är den snabbaste och skickligaste piloten i världen.</desc>
	<category lang="en">series</category>
	<episode-num system="xmltv_ns">. 0/11 .</episode-num>
	<episode-num system="onscreen">Del 1 av 11</episode-num>
  </programme>
  <programme start="20071006185000 +0200" stop="20071006195500 +0200" channel="kanal9.se">
	<title lang="sv">Pole to Pole</title>
	<desc lang="sv">Michael Palin följer upp sin resa jorden runt med att färdas från nordpolen till sydpolen längs longituden 30 grader öst. På sin resa passerar han 16 länder. Originaltitel: Pole to Pole.</desc>
	<category lang="en">series</category>
	<episode-num system="xmltv_ns">. 1/8 .</episode-num>
	<episode-num system="onscreen">Del 2 av 8</episode-num>
  </programme>

This post has been edited by redina: 04 October 2007 - 21:12


#9 User is offline   Delphi 

  • DVBViewer Junkie
  • PipPipPipPip
  • Group: Senior Members
  • Posts: 305
  • Joined: 31.March 06

Posted 13 October 2007 - 16:20

Thanks for the snippets!

I hope to have a test version ready soon.

#10 User is offline   Delphi 

  • DVBViewer Junkie
  • PipPipPipPip
  • Group: Senior Members
  • Posts: 305
  • Joined: 31.March 06

Posted 20 October 2007 - 09:31

Hi,

I have now a first test version ready:

http://delphi1248.di...iles/DVBViewer/

Please report back on

1) Can you get any EPG into DVBViewer?
2) Do the characters display as they should?

This testversion only processes the <title>, <sub-title> and the <desc> fields.
As an experiment the <category> is copied (without any needed translation) to the top of the <desc> field.

Regards

#11 User is offline   CiNcH 

  • Community Creator II
  • PipPipPipPipPipPipPipPipPip
  • Group: Moderators
  • Posts: 4,497
  • Joined: 26.August 06

Posted 20 October 2007 - 11:14

Great tool! However, I could not convince it to work.

I first load the XMLTV data source.

1. When I start the 'Channel Pairing' DVBViewer is started and immediately closed with Windows problem report again (guess the minimize action somehow forces it?)

EPG/XMLTV data and DVBViewer channellist are loaded correctly however. I have performed the mapping for one channel which is saved within the Pairings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<settings><section name="Channels"><entry name="PRO7">1107-17501</entry></section></settings>


2. When I now open 'Channel Pairing' again, Pairings.xml is not being read out and the pairing is not displayed. When I now perform further pairings the Pairing.xml (with the old pairings) is overwritten. Guess it is due to the early stage of the tool or not wanted at all?...

I then proceed to 'Test Import'.

3. Now it takes some time until an error occurs: "Failed to launch DVBViewer!". If I start the DVBViewer manually, XML Auto Import tool asks me to close it first. I don't think that I have to place the tool inside the same folder as dvbviewer.exe as DVBViewer also started before performing the mapping, so the tool knows where dvbviewer.exe resides.

This post has been edited by CiNcH: 20 October 2007 - 13:18


#12 User is offline   Delphi 

  • DVBViewer Junkie
  • PipPipPipPip
  • Group: Senior Members
  • Posts: 305
  • Joined: 31.March 06

Posted 20 October 2007 - 13:48

Did you read the ReadMe.txt?

ImportXMLTV.exe MUST reside in subfolder ImportXMLTV of the DVBViewer program folder:

C:\Programme files\DVBViewer\ImportXMLTV\ImportXMLTV.exe.

That DVBViewer is launched then minimized on channel pairing is how it should be.

If DVBViewer is running when you select Test Import, you are asked to close it.
DVBViewer will shortly after be launched again (If ImportXMLTV.exe is in the right place) :)

Regards

#13 User is offline   CiNcH 

  • Community Creator II
  • PipPipPipPipPipPipPipPipPip
  • Group: Moderators
  • Posts: 4,497
  • Joined: 26.August 06

Posted 20 October 2007 - 14:36

Quote

Did you read the ReadMe.txt?

Sorry, just read the 'Helps' within the application.
Now, the DVBViewer starts and shows an OSD that data has successfully been imported. But I can't see the imported data. TSID and SID are correct and I am looking for data at the right place (correct channel).
XMLTV data should also be correct as Lars' XMLTV importer works properly with the same data source.

Log:

Processing: Pairings.xml
1082-20002   PRO7
Reading 3680 DVBViewer Channels
Validating ChannelPairing:
1082-20002 OK
Loading: xmltv_data.xml
Processing: xmltv_data.xml
  Paired <programme> items found: 384
  Not Paired <programme> items found: 7978
Succes!


Quote

That DVBViewer is launched then minimized on channel pairing is how it should be.

Yes, but it does not minimize, DVBViewer crashes...

This post has been edited by CiNcH: 20 October 2007 - 14:52


#14 User is offline   boborg 

  • Experienced Member
  • PipPipPip
  • Group: Senior Members
  • Posts: 251
  • Joined: 01.August 03

Posted 20 October 2007 - 15:18

Working fine here with danish TVGG xml input.

#15 User is offline   CiNcH 

  • Community Creator II
  • PipPipPipPipPipPipPipPipPip
  • Group: Moderators
  • Posts: 4,497
  • Joined: 26.August 06

Posted 20 October 2007 - 15:56

Still a no-go here. Here's the data I have used:

http://members.inode...tv/channels.dat
http://members.inode.../xmltv_data.xml
http://members.inode...tv/Pairings.xml

Log:

Processing: Pairings.xml
1107-17500   SAT1
1107-17501   PRO7
Reading 3680 DVBViewer Channels
Validating ChannelPairing:
1107-17501 OK
1107-17500 OK
Loading: xmltv_data.xml
Processing: xmltv_data.xml
  Paired <programme> items found: 783
  Not Paired <programme> items found: 0
Succes!


Share this topic:


  • (33 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users