Private GIT

Skip to content
Snippets Groups Projects
Commit 1e95c084 authored by Dustyn Gibson's avatar Dustyn Gibson
Browse files

Correct a problem where name was reassined as a list in tntvillage, resulting...

Correct a problem where name was reassined as a list in tntvillage, resulting in error on second iteration.
Problem = `name = name.split(sub)`
Fixes SiCKRAGETV/sickrage-issues#2089
parent 7ec3dc6c
Branches
Tags
No related merge requests found
......@@ -116,10 +116,7 @@ class TNTVillageProvider(generic.TorrentProvider):
'download' : 'http://forum.tntvillage.scambioetico.org/index.php?act=Attach&type=post&id=%s',
}
self.sub_string = [
'sub',
'softsub',
]
self.sub_string = ['sub', 'softsub']
self.url = self.urls['base_url']
......@@ -296,37 +293,27 @@ class TNTVillageProvider(generic.TorrentProvider):
def _is_italian(self, torrent_rows):
is_italian = 0
span_tag = (torrent_rows.find_all('td'))[1].find('b').find('span')
name = str(span_tag)
if not name:
return 0
subFound=0
name = str(torrent_rows.find_all('td')[1].find('b').find('span'))
if not name or name is 'None':
return False
subFound = italian = False
for sub in self.sub_string:
if not re.search(sub, name, re.I):
continue
if re.search(sub, name, re.I):
subFound = True
else:
subFound = 1
name = name.split(sub)
continue
if re.search("ita", name[0], re.I):
if re.search("ita", name.split(sub)[0], re.I):
logger.log(u"Found Italian release", logger.DEBUG)
is_italian=1
italian = True
break
if not subFound:
if re.search("ita", name, re.I):
if not subFound and re.search("ita", name, re.I):
logger.log(u"Found Italian release", logger.DEBUG)
is_italian=1
italian = True
return is_italian
return italian
def _is_season_pack(self, name):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment