mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
Added try/except to Indexer API code when retrieving episodes
This commit is contained in:
parent
cf35e9778c
commit
1aca9da027
@ -280,10 +280,13 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
|
||||
#set $cur_downloaded = 0
|
||||
#set $cur_total = 0
|
||||
#set $download_stat_tip = ''
|
||||
#if None is not $curShow.status and re.search(r'(?i)(?:new|returning)\s*series', $curShow.status)
|
||||
#set $display_status = 'Continuing'
|
||||
#else
|
||||
#set $display_status = $curShow.status
|
||||
#set $display_status = $curShow.status
|
||||
#if None is not $display_status
|
||||
#if re.search(r'(?i)(?:new|returning)\s*series', $curShow.status)
|
||||
#set $display_status = 'Continuing'
|
||||
#else if re.search(r'(?i)(?:nded)', $curShow.status)
|
||||
#set $display_status = 'Ended'
|
||||
#end if
|
||||
#end if
|
||||
|
||||
#if $curShow.indexerid in $show_stat:
|
||||
@ -604,11 +607,17 @@ $myShowList.sort(lambda x, y: cmp(x.name, y.name))
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
#if None is not $curShow.status and re.search(r'(?i)(?:new|returning)\s*series', $curShow.status)
|
||||
Continuing
|
||||
#else:
|
||||
$curShow.status
|
||||
#set $display_status = $curShow.status
|
||||
#if None is not $display_status
|
||||
#if re.search(r'(?i)(?:new|returning)\s*series', $curShow.status)
|
||||
#set $display_status = 'Continuing'
|
||||
#else if re.search(r'(?i)(?:nded)', $curShow.status)
|
||||
#set $display_status = 'Ended'
|
||||
#end if
|
||||
#end if
|
||||
|
||||
$display_status
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
@ -870,9 +870,12 @@ class Tvdb:
|
||||
else:
|
||||
url = self.config['url_epInfo'] % (sid, language)
|
||||
|
||||
epsEt = self._getetsrc(url, language=language)
|
||||
try:
|
||||
epsEt = self._getetsrc(url, language=language)
|
||||
episodes = epsEt["episode"]
|
||||
except:
|
||||
return False
|
||||
|
||||
episodes = epsEt["episode"]
|
||||
if not isinstance(episodes, list):
|
||||
episodes = [episodes]
|
||||
|
||||
|
@ -604,9 +604,13 @@ class TVRage:
|
||||
log().debug('Getting all episodes of %s' % (sid))
|
||||
|
||||
self.config['params_epInfo']['sid'] = sid
|
||||
epsEt = self._getetsrc(self.config['url_epInfo'], self.config['params_epInfo'])
|
||||
|
||||
seasons = epsEt['episodelist']['season']
|
||||
try:
|
||||
epsEt = self._getetsrc(self.config['url_epInfo'], self.config['params_epInfo'])
|
||||
seasons = epsEt['episodelist']['season']
|
||||
except:
|
||||
return False
|
||||
|
||||
if not isinstance(seasons, list):
|
||||
seasons = [seasons]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user