[mythtv-users] tv_grab_au - W Channel

David Whyte david.whyte at gmail.com
Sat Jun 17 09:13:54 UTC 2006


On 6/17/06, Paul Neilson <neilson.paul at gmail.com> wrote:
>
> The problem is with the way find_channel matches the channel heading. For
> channels like W  it will also match any other channel that starts with a W
> (e.g. The Weather Channel).  Also,  currently if no channel is found then it
> will return the last channel,  which for me is 'W'
>
> In the latest version 060617 of Michael's tv_grab_au the function is at line
> 439.  Here is my suggested change which has worked fine for me since
> January.
>
>
> sub find_channel {
>   my $chan_heading = shift;
>   my $channel;
>   for (sort { length($b) <=> length($a) } keys %chanid) {
>     if ( index(lc $chan_heading, lc $_) == 0 )
>     {
>  $channel = $_;
>  last;
>     }
>   }
>   return $channel;
> }
>
> #sub find_channel {
> #  my $chan_heading = shift;
> #  my $channel;
> #  for (sort { length($b) <=> length($a) } keys %chanid) {
> #    $channel = $_, last if index(lc $chan_heading, lc $_) >= 0;
> #  }
> #  return $channel;
> #}
>

Just sending the fix directly to Michael, since he has been doing some
updates of late.  I don't use Fox, so I have never been impacted, but
it is best to get the patch rolled into the script rather than having
to search out the fix every time.

Cheers,
Whytey


More information about the mythtv-users mailing list