diff --git a/sickbeard/providers/torrentz.py b/sickbeard/providers/torrentz.py index 25af6b530e..dcb3fbef22 100644 --- a/sickbeard/providers/torrentz.py +++ b/sickbeard/providers/torrentz.py @@ -88,7 +88,9 @@ def search(self, search_strings, age=0, ep_obj=None): # pylint: disable=too-man if item.category and 'tv' not in item.category.get_text(strip=True): continue - title = item.title.text.replace('x264 ', 'x264-').replace('h264 ', 'h264-').replace('h 264 ', 'h264-').replace('xvid ', 'xvid-').replace(' ', '.') + title_raw = item.title.text + # Add "-" after codec and add missing "." + title = re.sub(r'([xh][ .]?264|xvid)', r'\1-', title_raw).replace(' ','.') if title_raw else '' t_hash = item.guid.text.rsplit('/', 1)[-1] if not all([title, t_hash]):