Fix for issue 357/385: apostrophes in titles not matching uploads without apostrophes - now checks for tokens both ways

This commit is contained in:
Remy Varma
2012-01-23 18:46:24 +00:00
parent fb6fbd2920
commit e9ee3d02bb

View File

@@ -478,8 +478,9 @@ def verifyresult(title, artistterm, term):
if token == 'Various' or token == 'Artists' or token == 'VA':
continue
if not re.search('(?:\W|^)+' + token + '(?:\W|$)+', title, re.IGNORECASE | re.UNICODE):
logger.info("Removed from results: " + title + " (missing token: " + token + ")")
return False
if not re.search('(?:\W|^)+' + token.replace("'","") + '(?:\W|$)+', title, re.IGNORECASE | re.UNICODE):
logger.info("Removed from results: " + title + " (missing tokens: " + token + " and " + token.replace("'","") + ")")
return False
return True
def getresultNZB(result):