mirror of
https://github.com/SickGear/SickGear.git
synced 2025-03-15 09:07:43 +00:00
Fixed regex matching in filterBadReleases function, was to restrictive causing valid releases to be invalid by SB
This commit is contained in:
parent
e3a843a823
commit
d5053ef8d3
1 changed files with 15 additions and 15 deletions
|
@ -53,24 +53,24 @@ def filterBadReleases(name):
|
||||||
logger.log(u"Unable to parse the filename " + name + " into a valid episode", logger.WARNING)
|
logger.log(u"Unable to parse the filename " + name + " into a valid episode", logger.WARNING)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# # use the extra info and the scene group to filter against
|
## use the extra info and the scene group to filter against
|
||||||
# check_string = ''
|
#check_string = ''
|
||||||
# if parse_result.extra_info:
|
#if parse_result.extra_info:
|
||||||
# check_string = parse_result.extra_info
|
# check_string = parse_result.extra_info
|
||||||
# if parse_result.release_group:
|
#if parse_result.release_group:
|
||||||
# if check_string:
|
# if check_string:
|
||||||
# check_string = check_string + '-' + parse_result.release_group
|
# check_string = check_string + '-' + parse_result.release_group
|
||||||
# else:
|
# else:
|
||||||
# check_string = parse_result.release_group
|
# check_string = parse_result.release_group
|
||||||
#
|
#
|
||||||
# # if there's no info after the season info then assume it's fine
|
## if there's no info after the season info then assume it's fine
|
||||||
# if not check_string:
|
#if not check_string:
|
||||||
# return True
|
# return True
|
||||||
|
|
||||||
# if any of the bad strings are in the name then say no
|
# if any of the bad strings are in the name then say no
|
||||||
for x in resultFilters + sickbeard.IGNORE_WORDS.split(','):
|
for x in resultFilters + sickbeard.IGNORE_WORDS.split(','):
|
||||||
if re.search('(^|[\W_])' + x.strip() + '($|[\W_])', name, re.I):
|
if re.search('(^|[\s_])' + x.strip() + '($|[\s_])', name, re.I):
|
||||||
logger.log(u"Invalid scene release: "+name+" contains "+x+", ignoring it", logger.DEBUG)
|
logger.log(u"Invalid scene release: " + name + " contains " + x + ", ignoring it", logger.DEBUG)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue