dont lookup imdb by default

This commit is contained in:
j 2011-11-01 18:37:45 +01:00
parent 8fe8822e09
commit e290438c75

View file

@ -15,7 +15,7 @@ def getId(url):
def getUrl(id): def getUrl(id):
return "http://www.criterion.com/films/%s" % id return "http://www.criterion.com/films/%s" % id
def getData(id, timeout=ox.cache.cache_timeout): def getData(id, timeout=ox.cache.cache_timeout, imdb=False):
''' '''
>>> getData('1333')['imdbId'] >>> getData('1333')['imdbId']
u'0060304' u'0060304'
@ -70,8 +70,9 @@ def getData(id, timeout=ox.cache.cache_timeout):
if timeout == ox.cache.cache_timeout: if timeout == ox.cache.cache_timeout:
timeout = -1 timeout = -1
data['imdbId'] = imdb.getMovieId(data['title'], if imdb:
data['director'], data['year'], timeout=timeout) data['imdbId'] = imdb.getMovieId(data['title'],
data['director'], data['year'], timeout=timeout)
return data return data
def getIds(): def getIds():