Return imdbid with 'tt'
This commit is contained in:
@@ -67,7 +67,7 @@ def getImdb(txt):
|
|||||||
output.close()
|
output.close()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
id = re.findall('imdb\.com\/title\/tt(\d{7})', txt)[0]
|
id = re.findall('imdb\.com\/title\/(tt\d{7})', txt)[0]
|
||||||
return id
|
return id
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ class Plugin(object):
|
|||||||
|
|
||||||
|
|
||||||
def getCache(self, cache_key, url = None):
|
def getCache(self, cache_key, url = None):
|
||||||
cache = Env.getValue('cache').get(cache_key)
|
cache = Env.get('cache').get(cache_key)
|
||||||
if cache:
|
if cache:
|
||||||
log.debug('Getting cache %s' % cache_key)
|
log.debug('Getting cache %s' % cache_key)
|
||||||
return cache
|
return cache
|
||||||
@@ -176,7 +176,7 @@ class Plugin(object):
|
|||||||
|
|
||||||
def setCache(self, cache_key, value, timeout = 300):
|
def setCache(self, cache_key, value, timeout = 300):
|
||||||
log.debug('Setting cache %s' % cache_key)
|
log.debug('Setting cache %s' % cache_key)
|
||||||
Env.getValue('cache').set(cache_key, value, timeout)
|
Env.get('cache').set(cache_key, value, timeout)
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def isDisabled(self):
|
def isDisabled(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user