diff --git a/CHANGES.md b/CHANGES.md index 0ba6b6c9..b9ae144e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -100,6 +100,11 @@ * Update unidecode library 0.04.18 to 0.04.20 (1e18d98) +### 0.12.28 (2017-08-26 18:15:00 UTC) + +* Change prevent indexer specific release name parts from fudging search logic + + ### 0.12.27 (2017-08-22 19:00:00 UTC) * Update to UnRar 5.50 release diff --git a/sickbeard/providers/newznab.py b/sickbeard/providers/newznab.py index 7df2b30e..5cccfa87 100755 --- a/sickbeard/providers/newznab.py +++ b/sickbeard/providers/newznab.py @@ -438,8 +438,15 @@ class NewznabProvider(generic.NZBProvider): title, url = None, None try: title = ('%s' % item.findtext('title')).strip() - for pattern, repl in ((r'\s+', '.'), (r'(?i)-Obfuscated$', '')): - title = re.sub(pattern, repl, title) + title = re.sub(r'\s+', '.', title) + # remove indexer specific release name parts + r_found = True + while r_found: + r_found = False + for pattern, repl in ((r'(?i)-Obfuscated$', ''), (r'(?i)-postbot$', '')): + if re.search(pattern, title): + r_found = True + title = re.sub(pattern, repl, title) url = str(item.findtext('link')).replace('&', '&') except (StandardError, Exception): pass