xmltv/grab/uk_rt tv_grab_uk_rt,1.33,1.34
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-serv4616/grab/uk_rt
Modified Files:
tv_grab_uk_rt
Log Message:
Add a new genre fixup specific to films. Certain film-related programmes are incorrectly flagged as being films. This update will permit such programmes to be reassigned to a more appropriate genre. Having a separate fixup type for films allows updates specific to films and will ignore other programmes sharing the same title.
Index: tv_grab_uk_rt
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_rt/tv_grab_uk_rt,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** tv_grab_uk_rt 1 Dec 2013 04:42:06 -0000 1.33
--- tv_grab_uk_rt 1 Dec 2013 05:01:50 -0000 1.34
***************
*** 213,216 ****
--- 213,217 ----
my %replacement_episodes; # key = title, value = hash (where key = old ep, value = new ep)
my %replacement_cats; # key = title, value = category
+ my %replacement_cats_film; # key = title, value = category
my %replacement_title_eps; # key = 'old_title . '|' . old_ep', value = (new_title, new_ep)
my %replacement_title_desc; # key = 'old_title . '|' . old_ep' . '|' . 'old_desc', value = (new_title, new_ep)
***************
*** 1588,1591 ****
--- 1589,1604 ----
next PROG_TITLE_ENTRY;
}
+ elsif ($code eq '12') {
+ my @fields = split( /~/, $process_text, 2);
+ if (scalar @fields != 2) {
+ t("[12] Invalid number of fields (need 2) in processing text: '" . $process_text . "'");
+ next PROG_TITLE_ENTRY;
+ }
+ my( $film_title, $cat ) = @fields;
+ $replacement_cats_film{$film_title} = $cat;
+ t("[12] Will re-assign film '" . $film_title . "' to category '" . $cat . "'");
+ $have_title_data = 1;
+ next PROG_TITLE_ENTRY;
+ }
else {
t("Unknown code seen in prog_titles_to_process file,"
***************
*** 3289,3295 ****
# Process programmes that may not be categorised, or are categorised with
# various categories in the source data. Untitled programmes ("To Be Announced")
! # and films are ignored. Different programmes having identical titles should not
! # be replaced using this routine as it may cause such programmes to be given
! # inaccurate genres.
#
sub process_replacement_genres {
--- 3302,3308 ----
# Process programmes that may not be categorised, or are categorised with
# various categories in the source data. Untitled programmes ("To Be Announced")
! # are ignored, and films are handled separately. Different programmes with
! # identical titles should not be replaced using this routine as it may cause
! # such programmes to be given inaccurate genres.
#
sub process_replacement_genres {
***************
*** 3302,3305 ****
--- 3315,3324 ----
}
}
+ elsif ($have_title_data && %replacement_cats_film && $prog->{'_title'} !~ m/^(To Be Announced|TBA)/i && $prog->{'_film'}) {
+ if (defined $replacement_cats_film{$prog->{'_title'}}) {
+ $prog->{'_genre'} = $replacement_cats_film{$prog->{'_title'}};
+ t(" Re-assigned film '" . $prog->{'_title'} . "' to category '" . $prog->{'_genre'} . "'");
+ }
+ }
}
------------------------------------------------------------------------------
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