mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +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)
|
||||
return False
|
||||
|
||||
# # use the extra info and the scene group to filter against
|
||||
# check_string = ''
|
||||
# if parse_result.extra_info:
|
||||
# check_string = parse_result.extra_info
|
||||
# if parse_result.release_group:
|
||||
# if check_string:
|
||||
# check_string = check_string + '-' + parse_result.release_group
|
||||
# else:
|
||||
# check_string = parse_result.release_group
|
||||
#
|
||||
# # if there's no info after the season info then assume it's fine
|
||||
# if not check_string:
|
||||
# return True
|
||||
## use the extra info and the scene group to filter against
|
||||
#check_string = ''
|
||||
#if parse_result.extra_info:
|
||||
# check_string = parse_result.extra_info
|
||||
#if parse_result.release_group:
|
||||
# if check_string:
|
||||
# check_string = check_string + '-' + parse_result.release_group
|
||||
# else:
|
||||
# check_string = parse_result.release_group
|
||||
#
|
||||
## if there's no info after the season info then assume it's fine
|
||||
#if not check_string:
|
||||
# return True
|
||||
|
||||
# if any of the bad strings are in the name then say no
|
||||
for x in resultFilters + sickbeard.IGNORE_WORDS.split(','):
|
||||
if re.search('(^|[\W_])' + x.strip() + '($|[\W_])', name, re.I):
|
||||
logger.log(u"Invalid scene release: "+name+" contains "+x+", ignoring it", logger.DEBUG)
|
||||
if re.search('(^|[\s_])' + x.strip() + '($|[\s_])', name, re.I):
|
||||
logger.log(u"Invalid scene release: " + name + " contains " + x + ", ignoring it", logger.DEBUG)
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue