Ticket #226: reconciler_mk2-skip_xlate_channel.patch

File reconciler_mk2-skip_xlate_channel.patch, 1.0 kB (added by mlampard, 3 years ago)

patch to implement skipping title translation for certain channels

  • reconciler_mk2

    old new  
    151151@{$reclogic{title_xlate_skip_categories}} = ("sports"); 
    152152$reclogic{title_xlate_skip_categories_min_programme_length} = (70 * 60); # 70 minutes 
    153153 
     154# skip title translation for these channels 
     155@{$reclogic{title_xlate_skip_channels}} = ("vh1.paytv.au","mtv.paytv.au"); 
     156 
    154157# store a preferred title only if we have at least 1 alternative 
    155158$reclogic{title_xlate_table_min_alt_progs} = 1; 
    156159 
     
    12761279                return ($title, $lang); 
    12771280        } 
    12781281 
     1282    # if channel is a member of the skiplist, don't translate titles. 
     1283    foreach my $skip_c (@{$reclogic{title_xlate_skip_channels}}) { 
     1284      if (lc($channel) eq lc($skip_c)) { 
     1285        return ($titles[0], $opt->{lang}); 
     1286      } 
     1287    } 
     1288     
    12791289    # if 70 minutes or longer and category sport return best title 
    12801290    if ($title_duration >= $reclogic{title_xlate_skip_categories_min_programme_length}) { 
    12811291        for my $i (0..($num_matching-1)) {