mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-20 16:43:43 +00:00
Regex fixes to resolve issue #10
This commit is contained in:
parent
10637f8f29
commit
9ba772ba44
1 changed files with 1 additions and 6 deletions
|
@ -194,12 +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,})[. _-]+(\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,3}.+\d{1,}[a-zA-Z]{2}\W+[a-zA-Z]{3,}\W+\d{4}.+))'
|
||||
if log:
|
||||
logger.log(u"Checking if show " + name + " matches " + curRegex, logger.DEBUG)
|
||||
|
||||
|
|
Loading…
Reference in a new issue