Rename to OMDBapi
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
from .main import IMDBAPI
|
|
||||||
|
|
||||||
def start():
|
|
||||||
return IMDBAPI()
|
|
||||||
|
|
||||||
config = []
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
from .main import OMDBAPI
|
||||||
|
|
||||||
|
def start():
|
||||||
|
return OMDBAPI()
|
||||||
|
|
||||||
|
config = []
|
||||||
+5
-5
@@ -10,11 +10,11 @@ import traceback
|
|||||||
log = CPLog(__name__)
|
log = CPLog(__name__)
|
||||||
|
|
||||||
|
|
||||||
class IMDBAPI(MovieProvider):
|
class OMDBAPI(MovieProvider):
|
||||||
|
|
||||||
urls = {
|
urls = {
|
||||||
'search': 'http://www.imdbapi.com/?%s',
|
'search': 'http://www.omdbapi.com/?%s',
|
||||||
'info': 'http://www.imdbapi.com/?i=%s',
|
'info': 'http://www.omdbapi.com/?i=%s',
|
||||||
}
|
}
|
||||||
|
|
||||||
http_time_between_calls = 0
|
http_time_between_calls = 0
|
||||||
@@ -32,7 +32,7 @@ class IMDBAPI(MovieProvider):
|
|||||||
'name': q
|
'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)
|
cached = self.getCache(cache_key, self.urls['search'] % tryUrlencode({'t': name_year.get('name'), 'y': name_year.get('year', '')}), timeout = 3)
|
||||||
|
|
||||||
if cached:
|
if cached:
|
||||||
@@ -50,7 +50,7 @@ class IMDBAPI(MovieProvider):
|
|||||||
if not identifier:
|
if not identifier:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
cache_key = 'imdbapi.cache.%s' % identifier
|
cache_key = 'omdbapi.cache.%s' % identifier
|
||||||
cached = self.getCache(cache_key, self.urls['info'] % identifier, timeout = 3)
|
cached = self.getCache(cache_key, self.urls['info'] % identifier, timeout = 3)
|
||||||
|
|
||||||
if cached:
|
if cached:
|
||||||
Reference in New Issue
Block a user