xmltv/grab/uk_rt tv_grab_uk_rt,1.34,1.35

Nick Morrott <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/grab/uk_rt
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8827/grab/uk_rt

Modified Files:
	tv_grab_uk_rt 
Log Message:
Add debugging for short films. Add some type 12 fixups.

Index: tv_grab_uk_rt
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_rt/tv_grab_uk_rt,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** tv_grab_uk_rt	1 Dec 2013 05:01:50 -0000	1.34
--- tv_grab_uk_rt	1 Dec 2013 05:59:07 -0000	1.35
***************
*** 245,253 ****
  my %hadC3AFC2BFC2BD;
  
! # Create hashes to store uncategories programmes and available categories
  # to potentially use for such programmes
  my %uncategorised_progs;
  my %categories;
  my %cats_per_prog;
  
  # Create hashes to store episode details that may still contain series, episode
--- 245,254 ----
  my %hadC3AFC2BFC2BD;
  
! # Create hashes to store uncategorised programmes and available categories
  # to potentially use for such programmes
  my %uncategorised_progs;
  my %categories;
  my %cats_per_prog;
+ my %short_films;
  
  # Create hashes to store episode details that may still contain series, episode
***************
*** 312,315 ****
--- 313,317 ----
      print_uncategorised_progs();
      print_cats_per_prog();
+     print_short_films();
      print_possible_prog_numbering();
      print_misencoded_utf8_data();
***************
*** 2407,2411 ****
  
      # Last, provide/update a programme's category based on 'corrected' title
!     # (type = 6)
      process_replacement_genres($prog);
  }
--- 2409,2413 ----
  
      # Last, provide/update a programme's category based on 'corrected' title
!     # (types = 6,12)
      process_replacement_genres($prog);
  }
***************
*** 2714,2719 ****
  }
  
! # Store details of uncategorised programmes and programmes having different
! # genres throughout the listings for alter analysis
  sub store_genre_debug_info {
      my $prog = shift;
--- 2716,2722 ----
  }
  
! # Store details of uncategorised programmes, programmes having different
! # genres throughout the listings, and films having a duration of less than
! # 75 minutes for further analysis
  sub store_genre_debug_info {
      my $prog = shift;
***************
*** 2728,2731 ****
--- 2731,2737 ----
              $cats_per_prog{$prog->{'_title'}}{$prog->{'_genre'}}++;
          }
+         elsif ($prog->{'_film'} and ($prog->{'_duration_mins'} < 75)) {
+             $short_films{$prog->{'_title'}} = $prog->{'_title'};
+         }
          elsif (! defined $prog->{'_genre'} && $prog->{'_title'} !~ m/^(To Be Announced|TBA|Close)$/) {
              $uncategorised_progs{$prog->{'_title'}} = $prog->{'_title'};
***************
*** 3318,3321 ****
--- 3324,3329 ----
          if (defined $replacement_cats_film{$prog->{'_title'}}) {
              $prog->{'_genre'} = $replacement_cats_film{$prog->{'_title'}};
+             $prog->{'_film'} = 0;
+             delete $prog->{'_year'};
              t("      Re-assigned film '" . $prog->{'_title'} . "' to category '" . $prog->{'_genre'} . "'");
          }
***************
*** 5234,5237 ****
--- 5242,5255 ----
  }
  
+ sub print_short_films {
+     if (%short_films && scalar keys %short_films > 0) {
+         say("\nStart of list of films shorter than 75 mins");
+         foreach my $title (sort keys %short_films) {
+             say("  $title");
+         }
+         say("End of list of films shorter than 75 mins");
+     }
+ }
+ 
  sub print_possible_prog_numbering {
      if (%possible_series_nums && scalar keys %possible_series_nums > 0) {


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.