Changeset 501

Show
Ignore:
Timestamp:
02/07/07 13:07:10 (6 years ago)
Author:
max
Message:

per #30

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • grabbers/oztivo

    r479 r501  
    33# OzTivo grabber 
    44 
    5 my $version = '0.13'; 
     5my $version = '0.14'; 
    66 
    77# Requires configuration! 
     
    2727# 0.13  : all oztivo programming is in GMT.  add +0000 to its timezone 
    2828#         so the rest of shepherd knows this. 
     29# 0.14  : patch from Paul to address TEN/10 channels 
    2930 
    3031use strict; 
     
    4748my $raw_input; 
    4849my $raw_output; 
     50my $d; 
    4951 
    5052print "$nicename Grabber v$version\n"; 
     
    105107die "\nError in channels file!\nDetails:\n$@" if ($@); 
    106108 
     109my $shortchannels; 
     110while (my ($name, $chanid) = each %$channels) { 
     111  $name =~ s/ *\(.*?\)//g; 
     112  $shortchannels->{$name} = $chanid; 
     113  if ($name =~ /TEN/i) { 
     114    $shortchannels->{10} = $chanid; 
     115  } 
     116} 
     117 
    107118# Create a list of channel names from longest to shortest 
    108 @clist = sort { length $b <=> length $a } keys %$channels; 
     119@clist = sort { length $b <=> length $a } keys %$shortchannels; 
    109120print "Channels: @clist.\n"; 
    110121 
     
    257268    foreach (@clist) 
    258269    { 
    259         return $channels->{$_} if ($station =~ /$_/i); 
    260     } 
    261     print "Warning: station \"$station\" unknown.\n"; 
     270        return $shortchannels->{$_} if ($station =~ /$_/i); 
     271    } 
     272 
     273    if (!defined $d->{ignored_channels}->{$station}) { 
     274        $d->{ignored_channels}->{$station} = 1; 
     275        print "Warning: station \"$station\" unknown.\n"; 
     276    } 
    262277    return $station; 
    263278} 
  • status

    r497 r501  
    55grabber         abc2_website        2.07 
    66grabber         sbsnews_website     0.04 
    7 grabber         oztivo              0.13-r1 
     7grabber         oztivo              0.14 
    88grabber         jrobbo              0.06 
    99grabber         ninemsn             0.08