Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: [PATCH] xmltv2vdr-1.0.5 vdr-1.3.x compatible (Was:Re: future of xmltv2vdr?)



On Thu, 11 Mar 2004, Adrian P Challinor wrote:

> But then again - I just ran 1.0.5 against VDR 1.3.5 and it works just 
fine.
> A wonder piece of code, very impressed.
>
> Adrian

I don't know if you've got any non-Freeview (eg Sky/Cable) channels
defined in your channels.conf, but the above patch helps when grabbing
listings from bleb.org - there's a clash between e4.channel4.com,
channel4.com and filmfour.channel4.com which creates slightly mangled
listings if you've got both of them defined in your xmltv.conf file.

The patch also adds a final parameter after the xmltv channel name which 
indicates what time offset (in seconds) should be applied to the listings. 
This allows +1 channel schedules to be populated without having to grab 
the listings separately.

cheers,

d.
--- xmltv2vdr-1.0.5/xmltv2vdr.pl	Mon May 19 22:34:04 2003
+++ /usr/local/bin/xmltv2vdr.pl	Fri Mar  5 19:36:24 2004
@@ -83,7 +83,7 @@
   
   chomp $chanline;
  
-  ($channel_name, $freq, $param, $source, $srate, $vpid, $apid, $tpid, $ca, $sid, $nid, $tid, $rid, $xmltv_channel_name) = split(/:/, $chanline);
+  ($channel_name, $freq, $param, $source, $srate, $vpid, $apid, $tpid, $ca, $sid, $nid, $tid, $rid, $xmltv_channel_name, $offset) = split(/:/, $chanline);
 
   if ( $source eq 'T' )
   { 
@@ -132,12 +132,12 @@
 
      # New XML Program - doesn't handle split programs yet
 
-     if ( ($xmlline =~ /\<programme/ ) && ( $xmlline =~ /$xmltv_channel_name/ ) && ( $xmlline !~ /clumpidx=\"1\/2\"/ ) && ( $chanevent == 0 ) )
+     if ( ($xmlline =~ /\<programme/ ) && ( $xmlline =~ /\"$xmltv_channel_name\"/ ) && ( $xmlline !~ /clumpidx=\"1\/2\"/ ) && ( $chanevent == 0 ) )
      {  
        $chanevent = 1;
        ( $null, $xmlst, $null, $xmlet, @null ) = split(/\"/, $xmlline);
-       $vdrst = &xmltime2vdr($xmlst);
-       $vdret = &xmltime2vdr($xmlet);
+       $vdrst = &xmltime2vdr($xmlst) + $offset;
+       $vdret = &xmltime2vdr($xmlet) + $offset;
        $vdrdur = $vdret - $vdrst;
        $vdrid = $vdrst / 60 % 0xFFFF;
        

Home | Main Index | Thread Index