From d5053ef8d33fd464f3d737298f5dbcc7fe07b13b Mon Sep 17 00:00:00 2001 From: echel0n Date: Fri, 21 Mar 2014 02:20:46 -0700 Subject: [PATCH] Fixed regex matching in filterBadReleases function, was to restrictive causing valid releases to be invalid by SB --- sickbeard/show_name_helpers.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sickbeard/show_name_helpers.py b/sickbeard/show_name_helpers.py index d7f2d443..cdefe2f4 100644 --- a/sickbeard/show_name_helpers.py +++ b/sickbeard/show_name_helpers.py @@ -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