xmltv/grab/fi/fi programme.pm,2.02,2.03
Stefan Becker <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/fi/fi
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17320/grab/fi/fi
Modified Files:
programme.pm
Log Message:
- programme: improve series subtitle extraction
Index: programme.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fi/fi/programme.pm,v
retrieving revision 2.02
retrieving revision 2.03
diff -C2 -d -r2.02 -r2.03
*** programme.pm 1 Nov 2013 22:55:13 -0000 2.02
--- programme.pm 3 Jan 2014 19:11:36 -0000 2.03
***************
*** 154,158 ****
# Check 1: object already contains episode
#
! my($left, $right);
if (defined($subtitle)) {
# nothing to be done
--- 154,158 ----
# Check 1: object already contains episode
#
! my($left, $special, $right);
if (defined($subtitle)) {
# nothing to be done
***************
*** 198,209 ****
#
# title: Batman
! # sub-title: Pingviinin paluu.
# description: Amerikkalainen animaatiosarja....
#
elsif ((defined $description) &&
(exists $series_description{$title}) &&
! (($left, $right) = ($description =~ /^\s*([^.!?]+[.!?])\s*(.*)/))) {
! # We only remove period from episode title, preserve others
! $left =~ s/\.$//;
debug(3, "XMLTV series title '$title' episode '$left'");
($subtitle, $description) = ($left, $right);
--- 198,232 ----
#
# title: Batman
! # sub-title: Pingviinin paluu
! # description: Amerikkalainen animaatiosarja....
! #
! # Special cases
! #
! # text: Pingviinin paluu?. Amerikkalainen animaatiosarja....
! # sub-title: Pingviinin paluu?
! # description: Amerikkalainen animaatiosarja....
! #
! # text: Pingviinin paluu... Amerikkalainen animaatiosarja....
! # sub-title: Pingviinin paluu...
! # description: Amerikkalainen animaatiosarja....
! #
! # text: Pingviinin paluu?!? Amerikkalainen animaatiosarja....
! # sub-title: Pingviinin paluu?!?
# description: Amerikkalainen animaatiosarja....
#
elsif ((defined $description) &&
(exists $series_description{$title}) &&
! (($left, $special, $right) = ($description =~ /^\s*([^.!?]+[.!?])([.!?]+\s+)?\s*(.*)/))) {
! unless (defined $special) {
! # We only remove period from episode title, preserve others
! $left =~ s/\.$//;
! } elsif (($left !~ /\.$/) &&
! ($special =~ /^\.\s/)) {
! # Ignore extraneous period after sentence
! } else {
! # Preserve others, e.g. ellipsis
! $special =~ s/\s+$//;
! $left .= $special;
! }
debug(3, "XMLTV series title '$title' episode '$left'");
($subtitle, $description) = ($left, $right);
------------------------------------------------------------------------------
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=84349831&iu=/4140/ostg.clktrk