Changeset 967
- Timestamp:
- 11/01/07 23:45:17 (6 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
postprocessors/flag_aus_hdtv (modified) (11 diffs)
-
status (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/postprocessors/flag_aus_hdtv
r927 r967 13 13 14 14 my $progname = "flag_aus_hdtv"; 15 my $version = "0.2 1";15 my $version = "0.22"; 16 16 17 17 $| = 1; … … 55 55 56 56 my %stats; 57 my $channels, my $opt_channels ;57 my $channels, my $opt_channels, my %channel_xmlid_to_opt_channel_xmlid; 58 58 my $d; 59 59 my $override_settings = { }; … … 265 265 } 266 266 267 my ($shortchannels, $shortoptchannels);267 my $shortchannels; 268 268 while (my ($name, $chanid) = each %$channels) 269 269 { … … 312 312 313 313 push @{$shortchannels->{$name}}, $chanid; 314 push @{$shortoptchannels->{$name."HD"}},$opt_channels->{$oldname."HD"}314 $channel_xmlid_to_opt_channel_xmlid{$chanid} = $opt_channels->{$oldname."HD"} 315 315 if defined $opt_channels->{$oldname."HD"}; 316 316 … … 322 322 } 323 323 $channels = $shortchannels; 324 $opt_channels = $shortoptchannels;325 324 } 326 325 … … 562 561 my $this_chan = $prog->{channel}; 563 562 my $this_title; 564 my $hd_chan_base;565 563 566 564 $this_title = $prog->{title}->[0]->[0] … … 570 568 goto NOMATCH if (!defined $this_chan); 571 569 goto NOMATCH if (!defined $this_title); 572 goto NOMATCH if (!defined $d->{prog}->{$this_chan});573 570 574 571 # if programme is already marked as HDTV, just skip all of this … … 586 583 printf " matched '$t' to '$this_title' (canonical match)\n" if (!defined $d->{seenprog}->{$this_title}); 587 584 $stats{matched_prog}++; 588 $hd_chan_base = $d->{prog}->{$this_chan}->{$t}->{chan}."HD";589 585 goto MATCH; 590 586 } … … 606 602 printf " matched '$t' to '$this_title' (hd override)\n" if (!defined $d->{seenprog}->{$this_title}); 607 603 $stats{override_matched_prog}++; 608 $hd_chan_base = $ch."HD";609 604 goto MATCH; 610 605 } … … 620 615 $prog->{video}->{aspect} = "16:9"; # widescreen 621 616 622 if (!defined $ opt_channels->{$hd_chan_base}) {617 if (!defined $channel_xmlid_to_opt_channel_xmlid{$this_chan}) { 623 618 # no HD variant 624 619 $prog->{video}->{quality} = "HDTV" unless (defined $opt->{notag}); 625 626 620 $writer->write_programme($prog); 627 621 $stats{rewrote_prog_as_hdtv_inplace}++; 628 622 } else { 629 623 if ($opt->{action} =~ /copy/) { 624 # SD channel 625 delete $prog->{video}->{quality}; 630 626 $writer->write_programme($prog); 631 627 $stats{rewrote_prog_as_hdtv_inplace}++; … … 634 630 # populate this programme in HD channel 635 631 $prog->{video}->{quality} = "HDTV" unless (defined $opt->{notag}); 636 foreach (@{$opt_channels->{$hd_chan_base}}) { 637 $prog->{channel} = $_; 638 $writer->write_programme($prog); 639 $stats{wrote_prog_into_hdtv_channel}++ 640 } 632 $prog->{channel} = $channel_xmlid_to_opt_channel_xmlid{$this_chan}; 633 $writer->write_programme($prog); 634 $stats{wrote_prog_into_hdtv_channel}++ 641 635 } 642 636 return; -
trunk/status
r966 r967 20 20 postprocessor imdb_augment_data 0.35 21 21 postprocessor tvdb_augment_data 0.11 22 postprocessor flag_aus_hdtv 0.2 122 postprocessor flag_aus_hdtv 0.22 23 23 postprocessor augment_timezone 0.17
