Page 1 of 1

Two display-name tags?

Posted: Wed Dec 27, 2006 2:53 pm
by D.A.
Hi folks,

I'm currently trying to set up Orb 2.0 to use the listings produced by XMLTVGUI in its EPG. Unfortunately to work 100% correctly, Orb seems to need the channel elements laid out EXACTLY as follows:

<channel id="490000-8-9018-12292-14336-BBC Radio 1">
<display-name>BBC Radio 1-DT</display-name>
<display-name>490000-8-9018-12292-14336-BBC Radio 1</display-name>
</channel>

(i.e. the ID contains the tuning info plus the channel name, this is then repeated in the second display-name tag).

Since I can sort out the ID and the second display-name tag OK by a little hacking around with the altchids script, my problem is how I get it to write out another display-name tag?

I had thought of changing my altchids.txt to be something like:

99:490000-8-9018-12292-14336-BBC Radio 1:BBC Radio 1-DT

but unfortunately my knowledge of Lua doesn't stretch to parsing that! Anyone help?

Thanks!

Posted: Wed Dec 27, 2006 2:56 pm
by alanbirtles
simply create a table with 2 strings in. see the iwki fo rmore details

Posted: Wed Dec 27, 2006 3:21 pm
by D.A.
Cheers Alan,

My problem is with the pattern matching though. If I have my altchids set up as above, what do I need in the string.gfind call to separate it out into its constituent parts?

I've tried:

Code: Select all

for id,alt,name2 in string.gfind(line,"(.-)%s+(.+)%s+(.+)") do
But of course this doesn't work, as some of the channel names have spaces in them.