mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Merge branch 'hotfix/0.12.28'
This commit is contained in:
commit
35b7583fcc
2 changed files with 17 additions and 5 deletions
|
@ -1,4 +1,9 @@
|
||||||
### 0.12.27 (2017-08-22 19:00:00 UTC)
|
### 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
|
* Update to UnRar 5.50 release
|
||||||
|
|
||||||
|
|
|
@ -411,13 +411,20 @@ class NewznabProvider(generic.NZBProvider):
|
||||||
def _title_and_url(self, item):
|
def _title_and_url(self, item):
|
||||||
title, url = None, None
|
title, url = None, None
|
||||||
try:
|
try:
|
||||||
title = item.findtext('title')
|
title = ('%s' % item.findtext('title')).strip()
|
||||||
url = item.findtext('link')
|
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):
|
except (StandardError, Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
title = title and re.sub(r'\s+', '.', '%s' % title)
|
|
||||||
url = url and str(url).replace('&', '&')
|
|
||||||
|
|
||||||
return title, url
|
return title, url
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue