Browse Source

Rename to OMDBapi

pull/1244/head
Ruud 13 years ago
parent
commit
041a206fb4
  1. 6
      couchpotato/core/providers/movie/imdbapi/__init__.py
  2. 6
      couchpotato/core/providers/movie/omdbapi/__init__.py
  3. 10
      couchpotato/core/providers/movie/omdbapi/main.py

6
couchpotato/core/providers/movie/imdbapi/__init__.py

@ -1,6 +0,0 @@
from .main import IMDBAPI
def start():
return IMDBAPI()
config = []

6
couchpotato/core/providers/movie/omdbapi/__init__.py

@ -0,0 +1,6 @@
from .main import OMDBAPI
def start():
return OMDBAPI()
config = []

10
couchpotato/core/providers/movie/imdbapi/main.py → couchpotato/core/providers/movie/omdbapi/main.py

@ -10,11 +10,11 @@ import traceback
log = CPLog(__name__)
class IMDBAPI(MovieProvider):
class OMDBAPI(MovieProvider):
urls = {
'search': 'http://www.imdbapi.com/?%s',
'info': 'http://www.imdbapi.com/?i=%s',
'search': 'http://www.omdbapi.com/?%s',
'info': 'http://www.omdbapi.com/?i=%s',
}
http_time_between_calls = 0
@ -32,7 +32,7 @@ class IMDBAPI(MovieProvider):
'name': q
}
cache_key = 'imdbapi.cache.%s' % q
cache_key = 'omdbapi.cache.%s' % q
cached = self.getCache(cache_key, self.urls['search'] % tryUrlencode({'t': name_year.get('name'), 'y': name_year.get('year', '')}), timeout = 3)
if cached:
@ -50,7 +50,7 @@ class IMDBAPI(MovieProvider):
if not identifier:
return {}
cache_key = 'imdbapi.cache.%s' % identifier
cache_key = 'omdbapi.cache.%s' % identifier
cached = self.getCache(cache_key, self.urls['info'] % identifier, timeout = 3)
if cached:
Loading…
Cancel
Save