From f337b2ed957cf3df021e0c792c0d1c68e6bf16a1 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 16 Dec 2011 23:23:42 +0100 Subject: [PATCH] Return imdbid with 'tt' --- couchpotato/core/helpers/variable.py | 2 +- couchpotato/core/plugins/base.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/helpers/variable.py b/couchpotato/core/helpers/variable.py index 56c1eba..03cf65d 100644 --- a/couchpotato/core/helpers/variable.py +++ b/couchpotato/core/helpers/variable.py @@ -67,7 +67,7 @@ def getImdb(txt): output.close() 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 except IndexError: pass diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index b25ea0d..810936e 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -161,7 +161,7 @@ class Plugin(object): def getCache(self, cache_key, url = None): - cache = Env.getValue('cache').get(cache_key) + cache = Env.get('cache').get(cache_key) if cache: log.debug('Getting cache %s' % cache_key) return cache @@ -176,7 +176,7 @@ class Plugin(object): def setCache(self, cache_key, value, timeout = 300): 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 def isDisabled(self):