xmltv/beta Augment.pm,1.2,1.3

Geoff <[email protected]> Sat, 04 Jul 2015 08:40:20 +0000
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/beta
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19416

Modified Files:
	Augment.pm 
Log Message:
changes to parsing of 'episode' in prog title (avoid false positives)

Index: Augment.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/beta/Augment.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Augment.pm	19 Dec 2014 08:34:07 -0000	1.2
--- Augment.pm	4 Jul 2015 08:40:18 -0000	1.3
***************
*** 874,877 ****
--- 874,879 ----
  		#
  		# I'm not convinced we should be matching things like "1." - can we be sure this is an ep number?
+ 		#	e.g. should not match --v
+ 		#	    {Premier League Years~~~1999/00}
  		);
  	if ( $prog->{$elem} =~
***************
*** 880,884 ****
  			# this is to avoid false matching on "1984" but even here we will falsely match "1984."
  			#
! 			s/^[\(\[]*(\d+)\s*(?:\/|[\.,]$)(\d*)[\.,]?[\)\]]*\s?(?:[\s\.,:;-]+\s*|\s*$)//i
  		)
  	{
--- 882,886 ----
  			# this is to avoid false matching on "1984" but even here we will falsely match "1984."
  			#
! 			s/^[\(\[]*(?!(?:19|20)\d\d)(\d+)\s*(?:\/|[\.,]$)(\d*)[\.,]?[\)\]]*\s?(?:[\s\.,:;-]+\s*|\s*$)//i
  		)
  	{
***************
*** 917,923 ****
  		#	24
  		#	1984
  		);
  	if ( $prog->{$elem} =~
! 			s/(?:^|[\s\(\[]+)s?(\d+)\s*[\/e]+\s*(\d+)[\s\.,]?[\)\]]*[\s\.]*$//i
  		)
  	{
--- 919,928 ----
  		#	24
  		#	1984
+ 		# 2015/16
+ 		# 2015/2016 could theoretically be ok but statistically unlikely
+ 		#   (although 2015/3000 could be ok but the likes of Eastenders don't have a 'total' so again this is unlikely)
  		);
  	if ( $prog->{$elem} =~
! 			s/(?:^|[\s\(\[]+)s?(?!(?:19|20)\d\d)(\d+)\s*[\/e]+\s*(\d+)[\s\.,]?[\)\]]*[\s\.]*$//i
  		)
  	{
***************
*** 1059,1065 ****
  		#	Pt 2/3
  		#	Pt. 3
  		);
  	if ( $prog->{$elem} =~
! 			s/(?:[\s\.,:;-]*\(?(?:part|pt\.?)\s*(\d+|${lang_words})\s*(?:(?:\/|of)\s*(\d+|${lang_words}))?\)?|:\s*(\d+))[\s\.,:;-]*/ /i
  		)
  	{
--- 1064,1073 ----
  		#	Pt 2/3
  		#	Pt. 3
+ 		#
+ 		#	should not match --v
+ 		#	Burnley v Preston North End: 2006/07
  		);
  	if ( $prog->{$elem} =~
! 			s/(?:[\s\.,:;-]*\(?(?:part|pt\.?)\s*(?!(?:19|20))(\d+|${lang_words})\s*(?:(?:\/|of)\s*(\d+|${lang_words}))?\)?|:\s*(\d+))[\s\.,:;-]*$/ /i
  		)
  	{
***************
*** 3204,3210 ****
  		}
  		
- 		l("\n".'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'."\n\n");
- 		
  	}
  }
  
--- 3212,3218 ----
  		}
  		
  	}
+ 	
+ 	l("\n".'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'."\n\n");
  }
  


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/