Changeset 395

Show
Ignore:
Timestamp:
12/30/06 16:25:19 (6 years ago)
Author:
lincoln
Message:

make the reconciler whinge (and ignore) any new channels it sees that it doesn't know about.\naddresses ticket #22 in a more generic way...

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • reconcilers/reconciler_mk2

    r314 r395  
    9595 
    9696my $progname = "reconciler_mk2"; 
    97 my $version = "0.16"; 
     97my $version = "0.17"; 
    9898 
    9999use LWP::UserAgent; 
    100100use Time::HiRes qw(gettimeofday tv_interval); 
    101101use XMLTV; 
    102 use XMLTV::ProgressBar; 
    103102use POSIX qw(strftime mktime); 
    104103use Getopt::Long; 
    105 use HTML::TreeBuilder; 
    106104use Data::Dumper; 
    107105use Compress::Zlib; 
    108 use Cwd; 
    109106 
    110107#### reconciler settings #### 
     
    135132# always rewrite XMLTV 'start' & 'stop', removing timezone 
    136133$reclogic{always_rewrite_start_stop_without_timezone} = 1; 
     134 
     135# add channels from data sources that we don't have in our channels.conf 
     136$reclogic{always_add_new_channels} = 0; # don't 
    137137 
    138138# when we have a title with a ": " in the middle but no subtitle, split 
     
    218218 
    219219my $opt = { }; 
    220 $opt->{output_file} =           cwd()."/output.xmltv"; 
    221 $opt->{config_file} =           cwd()."/".$progname.".config"; 
    222 $opt->{log_file} =              cwd()."/".$progname.".log"; 
    223 $opt->{alt_title_file} =        cwd()."/".$progname.".alt_title.log"; 
     220$opt->{output_file} =           "output.xmltv"; 
     221$opt->{config_file} =           $progname.".config"; 
     222$opt->{log_file} =              $progname.".log"; 
     223$opt->{alt_title_file} =        $progname.".alt_title.log"; 
    224224$opt->{lang} =                  "en"; 
    225225 
     
    873873        my $chan = $c->{id}; 
    874874        my %chan_lang; 
     875 
     876        # only add this channel if $reclogic{always_add_new_channels} is set 
     877        if ((!defined $in->{channels}->{$chan}) && (!$reclogic{always_add_new_channels})) { 
     878                &log($reclogic{warn_on_unknown_channel},(sprintf "WARNING: channel '%s' from file \"%s\" not in channels.conf; ignored.", $chan, $datafile)); 
     879                $stats{ignored_unknown_channel}++; 
     880                return; 
     881        } 
    875882 
    876883        if (defined $c->{'display-name'} && defined $c->{'display-name'}->[0]) { 
  • status

    r394 r395  
    1010grabber         ninemsn             0.03 
    1111grabber         yahoo7web           0.03 
    12 reconciler      reconciler_mk2      0.16 
     12reconciler      reconciler_mk2      0.17 
    1313postprocessor   imdb_augment_data   0.06 
    1414postprocessor   augment_timezone    0.04