[vdr] xmltv2vdr speedup and modification
sebastien.lucas at gmail.com
Mon Feb 26 12:05:41 CET 2007
On 2/13/07, Morfsta <morfsta at gmail.com> wrote:
> I'm the original author of xml2vdr (for my sins!), thanks for working on it
> and improving the performance.
> If everyone is happy with this new code release and it really improves the
> speed I'll wrap it up and make a formal release and get Klaus to add it to
> the VDR FTP site.
> As a lot of people seem to use xml2vdr, perhaps it would be good to
> resurrect it and keep it formally updated?
new version is attached and this time with a precise list of all changes :
- The Xmltv file is now read only one time (big speedup).
- You can have many channel xmltv id for each channel in channel.conf,
you can have :
BBC FOUR (TV):529833:I0C34D0M16B8T2G32Y0:T:27500:201:401,402:0:0:16832:0:0:0:knowledge.bbc.co.uk,test.anytv.com
I did that because I use two main xmltv source which of course don't
share the same channel id.
- sub-title are now processed.
- regex are now compiled one (thanks to Jori Hamalainen)
- I have replaced all split by regex to simplify (shorten) the code.
- Add a little test to drop already finished event (should be an
option, but I was too lazy for that for now).
- Added some my attributes to make "use strict" happier.
- Handle the case where two channels in channels.conf share the same
epg. I worked with vanilla 1.0.6 but not anymore.
I was able to get a little more speed of xmltv2vdr with a little help
from sed before using xmltv2vdr. Disclaimer : I'm terrible with sed so
please keep away the tar and feather ;)
# to remove things unused by wmltv2vdr, you may want to adapt this to
sed -e '/<category/d' -e '/<channel/,/<\/channel>/d' -e '/<date/d' -e
'/<length/d' -e 's/^[ \t]*//' tnt.xml > resultat.xml
and then make everything between <programme ....> and </programme> be
on one single line with script like that :
I was able to gain 1 minute out of 7 with that trick.
Thanks for your time.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10156 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20070226/0cd7bcf1/xmltv2vdr.obj
More information about the vdr