Fix for regex pattern to match Month's using more then 3 for there abbrv

This commit is contained in:
echel0n 2014-03-16 16:33:27 -07:00
parent a165b891e9
commit 02ef367583
2 changed files with 2 additions and 2 deletions

View file

@ -102,7 +102,7 @@ ep_regexes = [
'''
^(?P<series_name>.*?(UEFA|MLB|ESPN|WWE|MMA|UFC|TNA|EPL|NASCAR|NBA|NFL|NHL|NRL|PGA|SUPER LEAGUE|FORMULA|FIFA|NETBALL|MOTOGP).*?)
(?P<air_day>\d{1,2}[a-zA-Z]{2})[. _-]+ # 23rd and seperator
(?P<air_month>[a-zA-Z]{3,4})[. _-]+ # Nov and seperator
(?P<air_month>[a-zA-Z]{3,})[. _-]+ # Nov and seperator
(?P<air_year>\d{4})[. _-]+ # 2010
(?P<extra_info>.*?(?<![. _-])(?<!WEB))[. _-]+ # Make sure this is really the release group
(?P<release_group>.*?)$ # Group

View file

@ -194,7 +194,7 @@ def isGoodResult(name, show, log=True):
escaped_name = re.sub('\\\\[\\s.-]', '\W+', re.escape(curName))
if show.startyear:
escaped_name += "(?:\W+" + str(show.startyear) + ")?"
curRegex = '^' + escaped_name + '\W+(?:(?:S\d[\dE._ -])|(?:\d\d?x)|(?:\d{4}\W\d\d\W\d\d)|(?:(?:part|pt)[\._ -]?(\d|[ivx]))|Season\W+\d+\W+|E\d+\W+)|((.+?)[. _-]+)(\d{1,2}[a-zA-Z]{2})[. _-]+([a-zA-Z]{3,4})[. _-]+(\d{4})*(.+?)([. _-])()((([^- ]+))?)?$'
curRegex = '^' + escaped_name + '\W+(?:(?:S\d[\dE._ -])|(?:\d\d?x)|(?:\d{4}\W\d\d\W\d\d)|(?:(?:part|pt)[\._ -]?(\d|[ivx]))|Season\W+\d+\W+|E\d+\W+)|((.+?)[. _-]+)(\d{1,2}[a-zA-Z]{2})[. _-]+([a-zA-Z]{3,})[. _-]+(\d{4})*(.+?)([. _-])()((([^- ]+))?)?$'
if log:
logger.log(u"Checking if show " + name + " matches " + curRegex, logger.DEBUG)