somtimes its better to just make one imdb request

This commit is contained in:
j 2010-07-18 20:24:36 +02:00
parent 0a2e427f5f
commit b3345523b4

View file

@ -236,6 +236,15 @@ class Imdb(SiteParser):
if key in self: if key in self:
del self[key] del self[key]
class ImdbCombined(Imdb):
def __init__(self, id, timeout=-1):
_regex = {}
for key in self.regex:
if self.regex[key]['page'] == 'combined':
_regex[key] = self.regex[key]
self.regex = _regex
super(ImdbCombined, self).__init__(id, timeout)
def guess(title, director='', timeout=google.DEFAULT_TIMEOUT): def guess(title, director='', timeout=google.DEFAULT_TIMEOUT):
#FIXME: proper file -> title #FIXME: proper file -> title
title = title.split('-')[0] title = title.split('-')[0]