Don't parse movie if imdbapi timedout
This commit is contained in:
@@ -30,8 +30,9 @@ class IMDBAPI(MovieProvider):
|
||||
cache_key = 'imdbapi.cache.%s' % q
|
||||
cached = self.getCache(cache_key, self.urls['search'] % urlencode({'t': name_year.get('name'), 'y': name_year.get('year')}))
|
||||
|
||||
result = self.parseMovie(cached)
|
||||
log.info('Found: %s' % result['titles'][0] + ' (' + str(result['year']) + ')')
|
||||
if cached:
|
||||
result = self.parseMovie(cached)
|
||||
log.info('Found: %s' % result['titles'][0] + ' (' + str(result['year']) + ')')
|
||||
|
||||
return [result]
|
||||
|
||||
@@ -40,8 +41,9 @@ class IMDBAPI(MovieProvider):
|
||||
cache_key = 'imdbapi.cache.%s' % identifier
|
||||
cached = self.getCache(cache_key, self.urls['info'] % identifier)
|
||||
|
||||
result = self.parseMovie(cached)
|
||||
log.info('Found: %s' % result['titles'][0] + ' (' + str(result['year']) + ')')
|
||||
if cached:
|
||||
result = self.parseMovie(cached)
|
||||
log.info('Found: %s' % result['titles'][0] + ' (' + str(result['year']) + ')')
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user