xmltv2vdr 1.0.6 "channel=" problems (RESOLVED)

Message ID 52481.203.144.32.165.1176263179.squirrel@server27.ukservers.net
State New
Headers

Commit Message

Linux TV April 11, 2007, 3:46 a.m. UTC
  > I'm now getting my xml EPG from a different source, and am having problems
> getting the perl script to run properly.  My perl knowledge is poor (to
> say the least!!)
>
>
> The problem is, the epg xml I'm getting has the "channel=" at the wrong
> end of the "<programme"  sequence.
>
> So instead of:
> <programme start="20070412060000 +1200" stop="20070412061000 +1200"
> channel="1031.dvb.guide">
>
> it has :
> <programme channel="1031.dvb.guide" start="20070412060000 +1200"
> stop="20070412061000 +1200">
>

DONE:
        $vdrst = &xmltime2vdr($xmlst, $adjust);
        $vdret = &xmltime2vdr($xmlet, $adjust);
        $vdrdur = $vdret - $vdrst;


amazing what happens when you stare at a piece of code long enough...  :P
  

Comments

Sebastien Lucas April 11, 2007, 7:40 a.m. UTC | #1
On 4/11/07, Simon Baxter <linuxtv@nzbaxters.com> wrote:
> > I'm now getting my xml EPG from a different source, and am having problems
> > getting the perl script to run properly.  My perl knowledge is poor (to
> > say the least!!)
> >
> >
> > The problem is, the epg xml I'm getting has the "channel=" at the wrong
> > end of the "<programme"  sequence.
> >
> > So instead of:
> > <programme start="20070412060000 +1200" stop="20070412061000 +1200"
> > channel="1031.dvb.guide">
> >
> > it has :
> > <programme channel="1031.dvb.guide" start="20070412060000 +1200"
> > stop="20070412061000 +1200">
> >
>
> DONE:
> --- xmltv2vdr.pl        2006-08-17 04:35:33.000000000 +1200
> +++ xmltv2vdr_SBB.pl    2007-04-11 14:16:14.000000000 +1200
> @@ -187,7 +187,7 @@
>       if ( ($xmlline =~ /\<programme/ ) && ( $xmlline =~
> /\"$xmltv_channel_name/ ) && ( $xmlline !~ /clumpidx=\"1\/2\"/ ) &&
> ( $chanevent == 0 ) )
>       {
>         $chanevent = 1;
> -       ( $null, $xmlst, $null, $xmlet, @null ) = split(/\"/, $xmlline);
> +       ( $null, $null, $null, $xmlst, $null, $xmlet, @null ) =
> split(/\"/, $xmlline);
>         $vdrst = &xmltime2vdr($xmlst, $adjust);
>         $vdret = &xmltime2vdr($xmlet, $adjust);
>         $vdrdur = $vdret - $vdrst;
>
>
> amazing what happens when you stare at a piece of code long enough...  :P
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>

Hi,

The latest version of my modifications to xmltv2vdr should work too
(it should not care about the position of channel). Maybe you can test
it a little so I can bug a little Morfsta to make it a proper 1.0.7
release.

Thanks in advance.
  

Patch

--- xmltv2vdr.pl        2006-08-17 04:35:33.000000000 +1200
+++ xmltv2vdr_SBB.pl    2007-04-11 14:16:14.000000000 +1200
@@ -187,7 +187,7 @@ 
      if ( ($xmlline =~ /\<programme/ ) && ( $xmlline =~
/\"$xmltv_channel_name/ ) && ( $xmlline !~ /clumpidx=\"1\/2\"/ ) &&
( $chanevent == 0 ) )
      {
        $chanevent = 1;
-       ( $null, $xmlst, $null, $xmlet, @null ) = split(/\"/, $xmlline);
+       ( $null, $null, $null, $xmlst, $null, $xmlet, @null ) =
split(/\"/, $xmlline);