Don't search for empty movies. fixes #153
This commit is contained in:
1 parent
c2cb188d44
commit
7b1ef3c994
2 files changed
+5
-1
No files matched your search
@@ -27,6 +27,7 @@ class CouchPotatoApi(MovieProvider):
|
|||||||
|
|
||||||
def getReleaseDate(self, identifier = None):
|
def getReleaseDate(self, identifier = None):
|
||||||
|
|
||||||
|
if identifier is None: return {}
|
||||||
try:
|
try:
|
||||||
headers = {'X-CP-Version': fireEvent('app.version', single = True)}
|
headers = {'X-CP-Version': fireEvent('app.version', single = True)}
|
||||||
data = self.urlopen((self.api_url % ('eta')) + (identifier + '/'), headers = headers)
|
data = self.urlopen((self.api_url % ('eta')) + (identifier + '/'), headers = headers)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class IMDBAPI(MovieProvider):
|
|||||||
|
|
||||||
name_year = fireEvent('scanner.name_year', q, single = True)
|
name_year = fireEvent('scanner.name_year', q, single = True)
|
||||||
|
|
||||||
if not name_year.get('name'):
|
if not q or not name_year.get('name'):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
cache_key = 'imdbapi.cache.%s' % q
|
cache_key = 'imdbapi.cache.%s' % q
|
||||||
@@ -45,6 +45,9 @@ class IMDBAPI(MovieProvider):
|
|||||||
|
|
||||||
def getInfo(self, identifier = None):
|
def getInfo(self, identifier = None):
|
||||||
|
|
||||||
|
if not identifier:
|
||||||
|
return {}
|
||||||
|
|
||||||
cache_key = 'imdbapi.cache.%s' % identifier
|
cache_key = 'imdbapi.cache.%s' % identifier
|
||||||
cached = self.getCache(cache_key, self.urls['info'] % identifier)
|
cached = self.getCache(cache_key, self.urls['info'] % identifier)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user