Rename to OMDBapi
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
from .main import IMDBAPI
|
||||
|
||||
def start():
|
||||
return IMDBAPI()
|
||||
|
||||
config = []
|
||||
6
couchpotato/core/providers/movie/omdbapi/__init__.py
Normal file
6
couchpotato/core/providers/movie/omdbapi/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from .main import OMDBAPI
|
||||
|
||||
def start():
|
||||
return OMDBAPI()
|
||||
|
||||
config = []
|
||||
@@ -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:
|
||||
Reference in New Issue
Block a user