From aa94711788f3a74ea39aeb89b8d9d37cc63c9deb Mon Sep 17 00:00:00 2001 From: echel0n Date: Fri, 25 Apr 2014 12:36:42 -0700 Subject: [PATCH] Fixed issue with searches that contain special characters such as () --- sickbeard/classes.py | 1 + tests/tests.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sickbeard/classes.py b/sickbeard/classes.py index a34ce0d3..2ec2f335 100644 --- a/sickbeard/classes.py +++ b/sickbeard/classes.py @@ -159,6 +159,7 @@ class AllShowsListUI: for curShow in allSeries: if curShow in searchResults: continue + searchterm = re.escape(searchterm) if re.search(searchterm, curShow['seriesname'], flags=re.I) and 'firstaired' in curShow: searchResults.append(curShow) diff --git a/tests/tests.py b/tests/tests.py index ff516715..48faf86b 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -31,7 +31,7 @@ from sickbeard import classes class APICheck(unittest.TestCase): lang = "en" - search_term = 'american dad' + search_term = 'Reign (2013)' results = {} final_results = []