From e9ee3d02bb9ff2b1da942686e99a05c0578f3dc4 Mon Sep 17 00:00:00 2001 From: Remy Varma Date: Mon, 23 Jan 2012 18:46:24 +0000 Subject: [PATCH] Fix for issue 357/385: apostrophes in titles not matching uploads without apostrophes - now checks for tokens both ways --- headphones/searcher.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index d4828586..144636c4 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -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):