Changeset 1026

Show
Ignore:
Timestamp:
04/11/08 23:13:04 (5 years ago)
Author:
paul
Message:

reconciler_mk2: skip title translation for sport and at least 70 minutes long

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/reconcilers/reconciler_mk2

    r949 r1026  
    9696 
    9797my $progname = "reconciler_mk2"; 
    98 my $version = "0.36"; 
     98my $version = "0.37"; 
    9999 
    100100use LWP::UserAgent; 
     
    147147$reclogic{max_programme_length} = (12 * 60 * 60); # 12 hours 
    148148$reclogic{max_programme_length_opt_channels} = (18 * 60 * 60); # 18 hours 
     149 
     150# skip title translation for these categories and at least this long 
     151@{$reclogic{title_xlate_skip_categories}} = ("sport"); 
     152$reclogic{title_xlate_skip_categories_min_programme_length} = (70 * 60); # 70 minutes 
    149153 
    150154# store a preferred title only if we have at least 1 alternative 
     
    12671271                return ($title, $lang); 
    12681272        } 
     1273 
     1274    # if 70 minutes or longer and category sport return best title 
     1275    if ($title_duration >= $reclogic{title_xlate_skip_categories_min_programme_length}) { 
     1276        for my $i (0..($num_matching-1)) { 
     1277            if (defined $m->[$i]->{title} && defined $m->[$i]->{category}) { 
     1278                foreach my $found_c (@{($m->[$i]->{category})}) { 
     1279                    my $c = $found_c->[0]; 
     1280                    next if ($c eq ''); 
     1281 
     1282                    foreach my $skip_c (@{$reclogic{title_xlate_skip_categories}}) { 
     1283                        if (lc($c) eq lc($skip_c)) { 
     1284                            &log($reclogic{debug_choose_title},(sprintf 
     1285                            "choose_title: not using xlate table; using best title \"%s\" because category \"%s\" and length %d minutes", $titles[0], $skip_c, $title_duration/60)); 
     1286                            return ($titles[0], $opt->{lang}); 
     1287                        } 
     1288                    } 
     1289                } 
     1290            } 
     1291        } 
     1292    } 
    12691293 
    12701294        # 3. do we already have any titles in our list here in our 'preferred title' list? 
  • trunk/status

    r1025 r1026  
    1515grabber         citysearch          3.0.0-r1 
    1616grabber         acctv_website       0.04 
    17 reconciler      reconciler_mk2      0.36 
     17reconciler      reconciler_mk2      0.37 
    1818postprocessor   imdb_augment_data   0.37 
    1919postprocessor   tvdb_augment_data   0.11