From af39e2546c5c2d64d5ca1ff856613b4aa67d9522 Mon Sep 17 00:00:00 2001 From: Remy Date: Sat, 6 Aug 2011 11:14:55 -0700 Subject: [PATCH] Removed periods and underscores from title in filter --- headphones/searcher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/headphones/searcher.py b/headphones/searcher.py index 973c8143..91184bfd 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -468,7 +468,10 @@ def searchNZB(albumid=None, new=False): myDB.action('INSERT INTO snatched VALUES( ?, ?, ?, ?, DATETIME("NOW", "localtime"), ?, ?)', [albums[2], bestqual[0], bestqual[1], bestqual[2], "Snatched", nzb_folder_name]) def verifyresult(title, term): - if not re.search('^' + re.escape(term), title, re.IGNORECASE): + + title = re.sub('[\.\-\/]', ' ', title) + + if not re.search('^' + re.escape(term), re.subtitle, re.IGNORECASE): logger.info("Removed from results: " + title + " (artist not at string start).") return False elif re.search(re.escape(term) + '\w', title, re.IGNORECASE | re.UNICODE):