![]() ![]() |
Aug 6 2006, 12:35 AM
Post
#1
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
xml2MediaStar EPG Convertor Converts xmltv files from any source to MediaStar compatible EPG dat files. I've tested it with xmltv files from 6 different sources (including IceTv). To use just download, unzip, copy your xmltv file to the Data directory and name the xmltv file xmltv.xml. Or you can call it from the command line or a batch file and use the path/name of your xmltv file as a parameter. i.e. xml2ms "C:\Program Files\somegrabber\listings.xml" Requirements: Windows - and an xmltv file (IMG:style_emoticons/default/wink.gif) Download: http://pvr-tools.com/freeware/xml2ms.zip |
|
|
|
Aug 6 2006, 12:55 AM
Post
#2
|
|
|
DTV Forums Member ![]() ![]() ![]() Group: New Member Posts: 54 Joined: 1-October 05 Member No.: 13,670 |
Very nice Dave... Works well.
|
|
|
|
Aug 6 2006, 01:23 AM
Post
#3
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
Works well. I was hoping someone would say that... because I don't have a mediastar so I was programming 'blind' with no way of testing it myself. I still have to tweak the category flag (it currently only sets the flag for 'Movie') as at the moment I have no idea what number the ms firmware uses for other categories. Also the ratings may be incorrect... I had to estimate what they should be. |
|
|
|
Aug 6 2006, 09:33 AM
Post
#4
|
|
|
DTV Forums Member Group: Senior Member Posts: 5,376 Joined: 13-October 03 From: North Shore, Sydney Member No.: 1,199 |
This is my parental code in the EPG_uploader TAP, converts the harvested strings to the EIT defined ratings.
CODE int convert_parental(const unsigned char *buf)
{ //logf(4,"parental:%s\n",buf); //rating, where rating=min_age-3 I found these ages take2 (after a few reports back): 15=MA,13=M,11=PG,9=G,6=P?,18=R if (buf[0]=='G') return 6; if (buf[0]=='M' && buf[1]=='A') return 12; if (buf[0]=='R') return 15; if (buf[0]=='P' && buf[1]=='G') return 8; if (buf[0]=='M') return 10; if (buf[0]=='C') return 6; //may as well say that C is for general. EIT doesn't support a "C" rating. //else return 0; } |
|
|
|
Aug 6 2006, 11:00 AM
Post
#5
|
|
|
DTV Forums Member ![]() ![]() ![]() Group: New Member Posts: 54 Joined: 1-October 05 Member No.: 13,670 |
I was hoping someone would say that... because I don't have a mediastar so I was programming 'blind' with no way of testing it myself. I still have to tweak the category flag (it currently only sets the flag for 'Movie') as at the moment I have no idea what number the ms firmware uses for other categories. Also the ratings may be incorrect... I had to estimate what they should be. I have only created a MS dat file with it... havnt tested on the MS yet, but the dat file looked allright, as do the ratings. Have you thought about adding some configeration to the program such as channel mapping to LCN and ICE ID. This will help me with adding sat channels for my 820 (when I finally get it to work). |
|
|
|
Aug 6 2006, 11:53 AM
Post
#6
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
The Ice ID number is not needed for the MS epg - at least not in the current firmware. I only inserted the channel names as the iceid# so people could spot any errors in the dat file.
Currently it has channel-to-lcn mapping for all Oz broadcasters (and all known xml files with their different channel naming conventions). You can add extra channel mapping for sat/paytv channels by editing the xml2ms.awk file in a text editor (channel mapping is about 1/2 way down). Just bare in mind that the order is important (ABC2 has to come before ABC, and 31 has to come before 3 etc), and every line, except the last line, needs an 'else' at the end. So to add Cartoon Network, assuming that's what the channel's <display-name> is in the xml file, you'd add CODE if ( channel == "Cartoon Network" ) { lcn = "0123" } replacing '0123' with the Cartoon Network's LCN. |
|
|
|
Aug 6 2006, 07:14 PM
Post
#7
|
|
|
DTV Forums Member Group: Member Posts: 402 Joined: 5-July 06 From: Perth WA Member No.: 21,893 |
Good work Dave!
In Perth (or maybe its just my mediastar) i needed to change the LCN for SBS 1 from 1283 to 1282, other than that it works... (this will also need to be fixed once mediastar bug fix this bad LCN...) But, a few feature requests (IMG:style_emoticons/default/smile.gif) 1) we have a variable for input filename, i would like a variable for *output* directory that way i can just plug in the Mediastar and tell it what directory i want the EPG file to end up in. 2) The jrobbo files are not in GMT. Could we have a variable so we can fix the offset to GMT... I tried looking how to hardcode these manually and couldnt find it easily... and as for the GMT on second thought that is a hard problem... Are there any converters already out there that will manipulate the XML file times? |
|
|
|
Aug 6 2006, 08:39 PM
Post
#8
|
|
|
DTV Forums Member ![]() ![]() ![]() Group: New Member Posts: 54 Joined: 1-October 05 Member No.: 13,670 |
The Ice ID number is not needed for the MS epg - at least not in the current firmware. I only inserted the channel names as the iceid# so people could spot any errors in the dat file. Currently it has channel-to-lcn mapping for all Oz broadcasters (and all known xml files with their different channel naming conventions). You can add extra channel mapping for sat/paytv channels by editing the xml2ms.awk file in a text editor (channel mapping is about 1/2 way down). Just bare in mind that the order is important (ABC2 has to come before ABC, and 31 has to come before 3 etc), and every line, except the last line, needs an 'else' at the end. So to add Cartoon Network, assuming that's what the channel's <display-name> is in the xml file, you'd add CODE if ( channel == "Cartoon Network" ) { lcn = "0123" } replacing '0123' with the Cartoon Network's LCN. I get this when using the new dugg importer: CODE 2aagaiagaaaaa0 1234 170 The Aviator 0 0 0 0 0 0 0 'The Aviator' tells the story of Looks like the ICE ID and LCN are missing and the Event ID of 1234 is the same for all programs. BTW, I did manage to get my sat channels incorporated by editing the awk file though. |
|
|
|
Aug 6 2006, 09:07 PM
Post
#9
|
|
|
DTV Forums Member ![]() ![]() ![]() ![]() ![]() Group: Member Posts: 139 Joined: 27-March 05 From: Brisbane Member No.: 9,330 |
This is my parental code in the EPG_uploader TAP, converts the harvested strings to the EIT defined ratings. Ah, I meant to ask you about this sometime Tony - I was curious if the lack of a (P)reschool rating was a limitation of EPG_Uploader, the Toppy, or the EIT standards. I hadn't noticed the lack of a 'C' rating. I was going to look up all the relevant specs, but seeing as you posted that snippet here... (IMG:style_emoticons/default/smile.gif)
|
|
|
|
Aug 6 2006, 09:21 PM
Post
#10
|
|
|
DTV Forums Member Group: Member Posts: 402 Joined: 5-July 06 From: Perth WA Member No.: 21,893 |
Ah, I meant to ask you about this sometime Tony - I was curious if the lack of a (P)reschool rating was a limitation of EPG_Uploader, the Toppy, or the EIT standards... I had posted this in another thread re the mediastar ratings available, and was wondering what the "P" rating was....QUOTE For those who are interested in the EPG codes I manually tested the rating value from 0 to 23 and here is what you can play with
0,1=no icon 2,3=P 4,5=C 6,7=G 8,9=PG 10,11=M 12,13=MA 14-23...=AV |
|
|
|
Aug 6 2006, 09:39 PM
Post
#11
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
Updated to Version 1.1
- Added TDT channel mapping - Fixed ratings - Changed optional input file parameter - Added optional output path parameter - Added optional UTC offset parameter See the included readme. Can someone test numbers from 2 up to about 20 for 'flag1' to see what number relates to what category? |
|
|
|
Aug 6 2006, 09:51 PM
Post
#12
|
|
|
DTV Forums Member Group: Member Posts: 402 Joined: 5-July 06 From: Perth WA Member No.: 21,893 |
Updated to Version 1.1 Wow, that was quick, but Dave, there are a few quirks that crept in... run in a fresh directory and you will see... Ie needs input file name or it errors... and wants to create an iceepg directory in the target (but the target should be what i want) Can someone test numbers from 2 up to about 20 for 'flag1' to see what number relates to what category? Will test those flags later, you meant the first of thost numbered tags? |
|
|
|
Aug 6 2006, 09:55 PM
Post
#13
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
I get this when using the new dugg importer: CODE 2aagaiagaaaaa0 1234 170 The Aviator 0 0 0 0 0 0 0 'The Aviator' tells the story of Looks like the ICE ID and LCN are missing and the Event ID of 1234 is the same for all programs. BTW, I did manage to get my sat channels incorporated by editing the awk file though. The Event ID and ICE ID currently aren't used by the MS firmware... so I just added 1234 as the Event ID to all programs. I only put the channel name in as the ICE ID so users could easily spot mistakes in the dat file. I could have just left them both out. But missing LCNs are a problem. Can you zip and email me your awk file and xml file to 'support AT toppytools.com' |
|
|
|
Aug 6 2006, 10:21 PM
Post
#14
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
Wow, that was quick, (IMG:style_emoticons/default/cool.gif) QUOTE but Dave, there are a few quirks that crept in... run in a fresh directory and you will see... Ie needs input file name or it errors... and wants to create an iceepg directory in the target (but the target should be what i want) Both Fixed. (version 1.1.2) QUOTE Will test those flags later, you meant the first of thost numbered tags? Yep |
|
|
|
Aug 6 2006, 10:35 PM
Post
#15
|
|
|
DTV Forums Member Group: Member Posts: 402 Joined: 5-July 06 From: Perth WA Member No.: 21,893 |
Both Fixed. (version 1.1.2) Will version 1.1.3 have a working UTC converter? (IMG:style_emoticons/default/smile.gif) the one you gave doesnt appear to work with jrobbo DW files. What does it work with?I also tested out the flags and didnt notice a thing with 0-23 in both the 8th and 9th fields. it might be a live thing, but there is nothing to the EPG. Not implemented yet? |
|
|
|
Aug 6 2006, 11:46 PM
Post
#16
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
Will version 1.1.3 have a working UTC converter? (IMG:style_emoticons/default/smile.gif) the one you gave doesnt appear to work with jrobbo DW files. What does it work with? It works with files in this format: <programme start="20060803001000 +1000" stop="20060803003500 +1000" channel="2"> But apparently not in this format: <programme channel="2" start="20060803001000 +1000" stop="20060803003500 +1000"> I just included someone else's texta.exe. Looks like I'll have to code it myself. QUOTE I also tested out the flags and didnt notice a thing with 0-23 in both the 8th and 9th fields. it might be a live thing, but there is nothing to the EPG. Not implemented yet? Maybe it'll be in a later firmware release. |
|
|
|
Aug 7 2006, 12:29 AM
Post
#17
|
|
|
DTV Forums Member Group: Member Posts: 402 Joined: 5-July 06 From: Perth WA Member No.: 21,893 |
It works with files in this format: I had noticed you had included the texta, and that the comment from dialupxmltv is that it works with oztivo data. (oztivo blocks my IP for no good reason). Some may like to know that the D1xmltv grabber also has the correct format. {edit: ... has the correct format for textA}
<programme start="20060803001000 +1000" stop="20060803003500 +1000" channel="2"> But apparently not in this format: <programme channel="2" start="20060803001000 +1000" stop="20060803003500 +1000"> I just included someone else's texta.exe. Looks like I'll have to code it myself. |
|
|
|
Aug 7 2006, 12:52 AM
Post
#18
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
I just checked xmltv files from 10 different grabbers/sources and only jrobbo's xmltv files are in the wrong format.
|
|
|
|
Aug 7 2006, 08:30 AM
Post
#19
|
|
|
DTV Forums Member Group: Member Posts: 348 Joined: 28-August 03 From: Canberra, ACT Member No.: 503 |
I just checked xmltv files from 10 different grabbers/sources and only jrobbo's xmltv files are in the wrong format. Jrobbo's format is not strictly "wrong" as XML does not place significance on the order of attributes. A proper XML parser like Expat can handle jrobbo's files fine. |
|
|
|
Aug 7 2006, 11:42 AM
Post
#20
|
|
|
DTV Forums Member Group: Member Posts: 607 Joined: 2-January 05 From: Sydney Member No.: 7,483 |
|
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 31st July 2010 - 03:22 AM |