xmltv/grab/fi/fi programme.pm,2.07,2.08
Stefan Becker <[email protected]> Fri, 20 Nov 2015 20:19:23 +0000
| 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-serv11701/grab/fi/fi
Modified Files:
programme.pm
Log Message:
- programme: add another season/episode extraction
- iltapulu: fix programme detection
Index: programme.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fi/fi/programme.pm,v
retrieving revision 2.07
retrieving revision 2.08
diff -C2 -d -r2.07 -r2.08
*** programme.pm 8 Jun 2015 17:14:01 -0000 2.07
--- programme.pm 20 Nov 2015 20:19:21 -0000 2.08
***************
*** 224,229 ****
my $desc_subtitle;
! # Check for "Kausi <season>. Jakso <episode>/<# of episodes>. <sub-title>...."
if (my($desc_season, $desc_episode, $remainder) =
($description =~ m,^Kausi\s+(\d+)\.\s+Jakso\s+(\d+)(?:/\d+)?\.\s*(.*)$,)) {
$season = $desc_season;
--- 224,248 ----
my $desc_subtitle;
! # Check for "Kausi <season>, osa <episode>. <maybe sub-title>...."
if (my($desc_season, $desc_episode, $remainder) =
+ ($description =~ m/^Kausi\s+(\d+),\s+osa\s+(\d+)\.\s*(.*)$/)) {
+ $season = $desc_season;
+ $episode = $desc_episode;
+
+ # Repeat the above match on remaining description
+ ($left, $special, $right) = ($remainder =~ $match_description);
+
+ # Take a guess if we have a episode title in description or not
+ my $words;
+ $words++ while $left =~ /\S+/g;
+ if ($words > 5) {
+ # More than 5 words probably means no episode title
+ undef $left;
+ undef $special;
+ $right = $remainder;
+ }
+
+ # Check for "Kausi <season>. Jakso <episode>/<# of episodes>. <sub-title>...."
+ } elsif (my($desc_season, $desc_episode, $remainder) =
($description =~ m,^Kausi\s+(\d+)\.\s+Jakso\s+(\d+)(?:/\d+)?\.\s*(.*)$,)) {
$season = $desc_season;
***************
*** 241,244 ****
--- 260,264 ----
# Repeat the above match on remaining description
($left, $special, $right) = ($remainder =~ $match_description);
+
# Check for "<sub-title>. Kausi <season>, <episode>/<# of episodes>...."
} elsif (($desc_subtitle, $desc_season, $desc_episode, $remainder) =
------------------------------------------------------------------------------