From 64ad5fb6b433be4ac2a569a906b64e4b398638fb Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 22 Apr 2012 20:25:12 +0200 Subject: [PATCH] Don't limit CouchPotato api requests --- couchpotato/core/providers/movie/couchpotatoapi/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/providers/movie/couchpotatoapi/main.py b/couchpotato/core/providers/movie/couchpotatoapi/main.py index dd8d36d..17b58c0 100644 --- a/couchpotato/core/providers/movie/couchpotatoapi/main.py +++ b/couchpotato/core/providers/movie/couchpotatoapi/main.py @@ -12,7 +12,8 @@ log = CPLog(__name__) class CouchPotatoApi(MovieProvider): - apiUrl = 'http://couchpota.to/api/%s/' + api_url = 'http://couchpota.to/api/%s/' + http_time_between_calls = 0 def __init__(self): #addApiView('movie.suggest', self.suggestView) @@ -29,7 +30,7 @@ class CouchPotatoApi(MovieProvider): try: headers = {'X-CP-Version': fireEvent('app.version', single = True)} - data = self.urlopen((self.apiUrl % ('eta')) + (identifier + '/'), headers = headers) + data = self.urlopen((self.api_url % ('eta')) + (identifier + '/'), headers = headers) dates = json.loads(data) log.debug('Found ETA for %s: %s' % (identifier, dates)) return dates @@ -40,7 +41,7 @@ class CouchPotatoApi(MovieProvider): def suggest(self, movies = [], ignore = []): try: - data = self.urlopen((self.apiUrl % ('suggest')) + ','.join(movies) + '/' + ','.join(ignore) + '/') + data = self.urlopen((self.api_url % ('suggest')) + ','.join(movies) + '/' + ','.join(ignore) + '/') suggestions = json.loads(data) log.info('Found Suggestions for %s' % (suggestions)) except Exception, e: