From 75bf2edff2e9d55ac9b5ef97c53e1e98fd771864 Mon Sep 17 00:00:00 2001 From: jmseaton Date: Sat, 10 Jun 2017 18:26:00 -0400 Subject: [PATCH] getInfo function needed update getInfo function needed update to support the api key. Created a url variable to mirror search function. Also fixed a typo in the info url (apikiey > apikey) --- couchpotato/core/media/movie/providers/info/omdbapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/media/movie/providers/info/omdbapi.py b/couchpotato/core/media/movie/providers/info/omdbapi.py index ddb336e..e72762f 100644 --- a/couchpotato/core/media/movie/providers/info/omdbapi.py +++ b/couchpotato/core/media/movie/providers/info/omdbapi.py @@ -19,7 +19,7 @@ class OMDBAPI(MovieProvider): urls = { 'search': 'https://www.omdbapi.com/?apikey=%s&type=movie&%s', - 'info': 'https://www.omdbapi.com/?apikiey=%s&type=movie&i=%s', + 'info': 'https://www.omdbapi.com/?apikey=%s&type=movie&i=%s', } http_time_between_calls = 0 @@ -59,7 +59,8 @@ class OMDBAPI(MovieProvider): return {} cache_key = 'omdbapi.cache.%s' % identifier - cached = self.getCache(cache_key, self.urls['info'] % identifier, timeout = 3, headers = {'User-Agent': Env.getIdentifier()}) + url = self.urls['info'] % (self.getApiKey(), identifier) + cached = self.getCache(cache_key, url, timeout = 3, headers = {'User-Agent': Env.getIdentifier()}) if cached: result = self.parseMovie(cached)