Merge branch 'master' into develop

This commit is contained in:
JackDandy 2017-08-26 18:20:00 +01:00
commit 253f2237cc
2 changed files with 14 additions and 2 deletions

View file

@ -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

View file

@ -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