1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Fixed IndexError: list index out of range issue

This commit is contained in:
echel0n 2014-08-09 01:43:02 +00:00
parent c4105db242
commit 1136e5c833

View File

@ -61,9 +61,11 @@ class TvSubtitles(ServiceBase):
sid = int(match('tvshow-([0-9]+)\.html', elem.a['href']))
show_name = match('(.*) \(', elem.a.text)
results.append((show_name, sid))
#TODO: pick up the best one in a smart way
result = results[0]
return result[1]
if len(results):
#TODO: pick up the best one in a smart way
result = results[0]
return result[1]
@cachedmethod
def get_episode_id(self, series_id, season, number):