def filterBadReleases(name):
 try:
  fp = NameParser()
  parse_result = fp.parse(name)
 except InvalidNameException:
  logger.log(((u'Unable to parse the filename ' + name) + ' into a valid episode'), logger.WARNING)
  return False
 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 (not check_string):
  return True
 for ignore_word in (resultFilters + sickbeard.IGNORE_WORDS.split(',')):
  ignore_word = ignore_word.strip()
  if ignore_word:
   if re.search((('(^|[\\W_])' + ignore_word) + '($|[\\W_])'), check_string, re.I):
    logger.log(((((u'Invalid scene release: ' + name) + ' contains ') + ignore_word) + ', ignoring it'), logger.DEBUG)
    return False
 return True

def filterBadReleases ( name ) : try : fp = NameParser ( ) parse_result = fp . parse ( name ) except InvalidNameException : logger . log ( ( ( u'Unable to parse the filename ' + name ) + ' into a valid episode' ) , logger . WARNING ) return False 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 ( not check_string ) : return True for ignore_word in ( resultFilters + sickbeard . IGNORE_WORDS . split ( ',' ) ) : ignore_word = ignore_word . strip ( ) if ignore_word : if re . search ( ( ( '(^|[\\W_])' + ignore_word ) + '($|[\\W_])' ) , check_string , re . I ) : logger . log ( ( ( ( ( u'Invalid scene release: ' + name ) + ' contains ' ) + ignore_word ) + ', ignoring it' ) , logger . DEBUG ) return False return True
filters out non-english and just all-around stupid releases by comparing them to the resultfilters contents .