Changeset 1079
- Timestamp:
- 07/01/08 23:47:26 (5 years ago)
- Location:
- trunk
- Files:
-
- 12 modified
-
applications/shepherd (modified) (15 diffs)
-
grabbers/abc_website.conf (modified) (1 diff)
-
grabbers/channelnsw_gov.conf (modified) (1 diff)
-
grabbers/oztivo.conf (modified) (1 diff)
-
grabbers/rex.conf (modified) (1 diff)
-
grabbers/sbsnews_website.conf (modified) (1 diff)
-
grabbers/sbsweb.conf (modified) (1 diff)
-
grabbers/southerncross_website.conf (modified) (1 diff)
-
grabbers/ten_website.conf (modified) (1 diff)
-
grabbers/yahoo7widget.conf (modified) (1 diff)
-
status (modified) (1 diff)
-
util/gconf-builder (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/applications/shepherd
r1077 r1079 2 2 3 3 our $progname = 'shepherd'; 4 my $version = '1.3.1 1';4 my $version = '1.3.12'; 5 5 6 6 # tv_grab_au … … 225 225 &calc_date_range; 226 226 &start_tor; 227 227 228 &grab_data("standard"); 229 228 230 &grab_data("paytv") if (defined $want_paytv_channels); 231 232 &grab_data("expanded"); # Use C2 grabbers to fill missing sub-titles 233 229 234 $any_data = &reconcile_data; 230 235 if ($any_data) … … 2602 2607 2603 2608 $find_microgaps = 0; 2609 $missing_unfillable = undef; 2604 2610 2605 2611 my $used_grabbers = 0; 2606 2612 &log("\nSHEPHERD: Grabber stage ($grab_policy).\n"); 2613 &log("SHEPHERD: Seeking supplementary data for episode names ('sub-titles').\n"); 2607 2614 &log("SHEPHERD: " . 2608 2615 (($opt->{mode} and grep($_ eq lc($opt->{mode}), qw(quality speed))) ? … … 2645 2652 ($find_microgaps ? 'microgaps within ' : '') . 2646 2653 display_best_timeslice()); 2647 2648 record_requested_chandays($grabber, $timeslice);2649 2654 2650 2655 if ($timeslice->{start} != 0) … … 2696 2701 $comm .= " --channels_file $channels_file"; 2697 2702 } 2703 2704 &record_requested_chandays($grabber, $timeslice); 2698 2705 2699 2706 if ((defined $plugin_data->{tor_pid}) && … … 2759 2766 2760 2767 my $missing_before = convert_dayhash_to_list($missing); 2761 my $missing_after = convert_dayhash_to_list(detect_missing_data( 1));2768 my $missing_after = convert_dayhash_to_list(detect_missing_data($grab_policy, 1)); 2762 2769 my $list = List::Compare->new($missing_before, $missing_after); 2763 2770 my @grabbed = $list->get_symmetric_difference(); … … 2780 2787 2781 2788 last if ($data_found_all); 2782 if ($data_satisfies_policy )2789 if ($data_satisfies_policy and $grab_policy ne 'expanded') 2783 2790 { 2784 2791 $find_microgaps = 1; … … 2821 2828 my $grabber_policy = shift; 2822 2829 2823 $missing = detect_missing_data( ) if ($grabber_policy ne "paytv");2830 $missing = detect_missing_data($grabber_policy) if ($grabber_policy ne "paytv"); 2824 2831 my $total; 2825 2832 … … 2854 2861 $timeslice = find_best_timeslice(); 2855 2862 2856 if ($timeslice->{chandays} == 0 && !$find_microgaps ) {2863 if ($timeslice->{chandays} == 0 && !$find_microgaps and $grabber_policy eq 'standard') { 2857 2864 &log("SHEPHERD: No fillable timeslices, trying microgaps!\n\n"); 2858 2865 $find_microgaps = 1; 2859 $missing = detect_missing_data( );2866 $missing = detect_missing_data($grabber_policy); 2860 2867 remove_missing_unfillable(); 2861 2868 $timeslice = find_best_timeslice(); … … 3085 3092 } 3086 3093 3087 if (!supports_region($grabber)) 3088 { 3089 &log(1, "Zeroing $grabber due to no region support\n"); 3094 if ($grabber_policy eq 'expanded' and ($cat != 2 or !&query_config($grabber, 'has_subtitles'))) 3095 { 3090 3096 $hits = 0; 3091 3097 } 3098 elsif (!supports_region($grabber)) 3099 { 3100 # &log(1, "Zeroing $grabber due to no region support\n"); 3101 $hits = 0; 3102 } 3092 3103 elsif (($find_microgaps) and (!query_config($grabber, 'micrograbs'))) 3093 3104 { 3094 &log(1, "Zeroing $grabber due to non-micrograbbing\n");3105 # &log(1, "Zeroing $grabber due to non-micrograbbing\n"); 3095 3106 $hits = 0; 3096 3107 } … … 3161 3172 $dq, 3162 3173 $score) if ($hits); 3163 &log(1, "$str.\n");3174 # &log(1, "$str.\n"); 3164 3175 3165 3176 if ($score and query_config($grabber, 'option_anon_socks') and !defined $plugin_data->{tor_pid}) 3166 3177 { 3167 &log(1, "Grabber $grabber needs Tor to run efficiently: reducing score.\n");3178 # &log(1, "Grabber $grabber needs Tor to run efficiently: reducing score.\n"); 3168 3179 $score = int($score/10)+1; 3169 3180 } … … 3193 3204 $total -= $gscore->{$_}; 3194 3205 $gscore->{$_} = 0; 3195 &log(1, "Zeroing grabber $_ due to low data quality.\n");3206 # &log(1, "Zeroing grabber $_ due to low data quality.\n"); 3196 3207 } 3197 3208 } … … 3305 3316 3306 3317 # Build a dayhash of what channel/day data we're currently missing. 3307 # Only policy-violating holes count unless it's sent the detect_microgaps 3308 # flag. 3318 # Only policy-violating holes count unless $find_microgaps is set. 3309 3319 sub detect_missing_data 3310 3320 { 3311 my ($ quiet) = @_;3321 my ($grabber_policy, $quiet) = @_; 3312 3322 3313 3323 my $m = { }; 3314 3324 3315 3325 &log("SHEPHERD: Hunting for microgaps!\n") if ($find_microgaps and !$quiet); 3316 my @chans;3317 3326 foreach my $ch (keys %$channels) 3318 3327 { … … 3329 3338 push (@{($m->{$day})}, $ch); 3330 3339 $lastday = $day; 3331 push (@chans, $ch) unless (grep ($_ eq $ch, @chans));3332 3340 } 3341 } 3342 } 3343 elsif ($grabber_policy eq 'expanded') 3344 { 3345 # Search our guide data for any channel-days that were filled 3346 # by grabbers that don't support sub-titles. 3347 3348 foreach my $day (@{($channel_data->{$ch}->{analysis}->{day})}) 3349 { 3350 my $str; 3351 3352 foreach my $plugin (keys %$plugin_data) 3353 { 3354 next unless ($plugin =~ /^(.*)-\d+$/); 3355 my $pluginname = $1; 3356 3357 next unless ($components->{$pluginname} and $components->{$pluginname}->{type} eq 'grabber'); 3358 3359 if ($plugin_data->{$plugin}->{analysis}->{$ch}->{day}->[$day->{num}]->{have}) 3360 { 3361 # This grabber has supplied some data for this channel-day 3362 3363 if (&query_config($pluginname, 'has_subtitles')) 3364 { 3365 # The grabber supports subtitles 3366 3367 if (!$plugin_data->{$plugin}->{analysis}->{$ch}->{day}->[$day->{num}]->{missing}) 3368 { 3369 # A subtitle-supporting grabber supplied this channel-day; 3370 # no need for further data. 3371 3372 $m->{$day->{num}} = [ grep($_ ne $ch, @{$m->{$day->{num}}}) ]; 3373 delete $m->{$day->{num}} unless (@{$m->{$day->{num}}}); 3374 undef $str; 3375 last; 3376 } 3377 3378 # Otherwise this grabber didn't fill the whole day, so 3379 # we still should seek data 3380 } 3381 else 3382 { 3383 # The grabber that supplied data doesn't support sub-titles; 3384 # add this channel-day to our list of holes. 3385 3386 $str = "May lack episode names: $ch day $day->{num} (filled by $pluginname)\n"; 3387 push(@{($m->{($day->{num})})}, $ch); 3388 } 3389 } 3390 } 3391 &log(1, "SHEPHERD: $str") if ($str); # If we get this far, it's a 'suspect' channel-day 3333 3392 } 3334 3393 } … … 3338 3397 { 3339 3398 push(@{($m->{($day->{num})})}, $ch) unless ($day->{day_ok}); 3340 push (@chans, $ch) unless (grep ($_ eq $ch, @chans));3341 }3342 }3343 } 3344 3399 } 3400 } 3401 } 3402 3403 my @chans; 3345 3404 foreach my $day (keys %$m) 3346 3405 { 3347 3406 $m->{$day} = [ sort @{$m->{$day}} ]; 3407 foreach my $ch (@{$m->{$day}}) 3408 { 3409 push (@chans, $ch) unless (grep ($_ eq $ch, @chans)); 3410 } 3348 3411 } 3349 3412 -
trunk/grabbers/abc_website.conf
r1009 r1079 11 11 'micrograbs' => 1, 12 12 'quality' => 2, 13 'has_subtitles' => 1, 13 14 'cache' => 1, 14 15 'max_runtime' => '120', -
trunk/grabbers/channelnsw_gov.conf
r728 r1079 12 12 'category' => 2, 13 13 'quality' => 3, 14 'has_subtitles' => 1, 14 15 'option_days' => '--days' 15 16 }; -
trunk/grabbers/oztivo.conf
r1062 r1079 9 9 'type' => 'both', 10 10 'max_runtime' => '15', 11 'has_subtitles' => 1, 11 12 'quality' => 1 12 13 }; -
trunk/grabbers/rex.conf
r1072 r1079 19 19 }, 20 20 'max_runtime' => '240', 21 'has_subtitles' => 1, 21 22 'option_days' => '--days', 22 23 'micrograbs' => 1, -
trunk/grabbers/sbsnews_website.conf
r966 r1079 11 11 'micrograbs' => 1, 12 12 'quality' => 3, 13 'has_subtitles' => 1, 13 14 'max_runtime' => '15', 14 15 'option_days' => '--days' -
trunk/grabbers/sbsweb.conf
r1059 r1079 12 12 'category' => 2, 13 13 'quality' => 2, 14 'has_subtitles' => 1, 14 15 'option_days' => '--days' 15 16 }; -
trunk/grabbers/southerncross_website.conf
r1061 r1079 14 14 'category' => 2, 15 15 'quality' => '2.5', 16 'has_subtitles' => 1, 16 17 'option_days' => '--days' 17 18 }; -
trunk/grabbers/ten_website.conf
r507 r1079 13 13 'micrograbs' => 1, 14 14 'quality' => 3, 15 'has_subtitles' => 1, 15 16 'cache' => 1, 16 17 'option_days' => '--days' -
trunk/grabbers/yahoo7widget.conf
r1076 r1079 16 16 'category' => 2, 17 17 'quality' => 3, 18 'has_subtitles' => 1, 18 19 'option_days' => '--days', 19 20 'channel_support_exceptions' => '63:-7HD,TEN_HD 67:-Prime_HD,Nine_HD,TEN_HD 69:-Nine_HD,TEN_HD 71:-Nine_HD,TEN_HD 73:-Channel_NSW,ACC,EXPO 74:-7HD,Nine_HD,TEN_HD 79:-Nine_HD,TEN_HD 82:-Nine_HD,TEN_HD 83:-Nine_HD,TEN_HD 85:-Nine_HD,TEN_HD 86:-7HD,Nine_HD,TEN_HD 88:-7HD,Nine_HD,TEN_HD 90:-Nine_HD,TEN_HD 95:-Nine_HD,TEN_HD 98:-7HD,Nine_HD,TEN_HD 102:-7HD,Nine_HD,TEN_HD 106:-7HD,Prime_HD,Nine_HD 107:-7HD,Nine_HD 108:-7HD,Nine_HD 114:-7HD,Nine_HD 126:-Nine_HD,TEN_HD 184:-Nine_HD,TEN_HD 253:-Nine_HD,TEN_HD 254:-Nine_HD,TEN_HD 256:-Nine_HD,TEN_HD 257:-Nine_HD,TEN_HD 258:-Nine_HD,TEN_HD 259:-Nine_HD,TEN_HD 261:-Nine_HD,TEN_HD 262:-Nine_HD,TEN_HD 263:-Nine_HD,TEN_HD 264:-Nine_HD,TEN_HD 266:-Nine_HD,TEN_HD 267:-Nine_HD,TEN_HD 268:-Nine_HD,TEN_HD', -
trunk/status
r1077 r1079 1 application shepherd 1.3.1 11 application shepherd 1.3.12 2 2 reference channel_list 22 3 3 reference Shepherd/Common.pm 0.36 4 4 reference Shepherd/MythTV.pm 0.7 5 5 reference Shepherd/Configure.pm 0.1 6 grabber yahoo7widget 1.106-r 17 grabber rex 3.6.8-r 18 grabber abc_website 3.21 9 grabber sbsnews_website 1.00 10 grabber oztivo 2.19 6 grabber yahoo7widget 1.106-r2 7 grabber rex 3.6.8-r2 8 grabber abc_website 3.21-r1 9 grabber sbsnews_website 1.00-r1 10 grabber oztivo 2.19-r1 11 11 grabber yahoo7web 0.34-r1 12 12 grabber foxtel_swf 0.27 13 grabber channelnsw_gov 0.8 14 grabber southerncross_website 0.20 15 grabber ten_website 1.06 13 grabber channelnsw_gov 0.8-r1 14 grabber southerncross_website 0.20-r1 15 grabber ten_website 1.06-r1 16 16 grabber citysearch 3.0.1 17 17 grabber acctv_website 0.08 18 grabber sbsweb 1.02 18 grabber sbsweb 1.02-r1 19 19 reconciler reconciler_mk2 0.39 20 20 postprocessor imdb_augment_data 0.44 -
trunk/util/gconf-builder
r812 r1079 166 166 } 167 167 168 print "\nCATEGORY: Data Quality\n\n" .168 print "\nCATEGORY: Data Accuracy\n\n" . 169 169 "Rate the accuracy of the data $grabber fetches; i.e. how often it\n" . 170 170 "can be relied upon to report the right programs in the right timeslots.\n" . … … 176 176 177 177 $config->{quality} = ask_choice("Data quality?", 3, 1, 2, 3); 178 179 print "\nCATEGORY: Data Comprehensiveness (sub-titles)\n\n"; 180 $config->{has_subtitles} = ask_boolean("Does $grabber gather episode names?", 1); 178 181 179 182 print "\nCATEGORY: Granularity\n\n" .
