|
@ -61,7 +61,7 @@ class TheMovieDb(MovieProvider): |
|
|
|
|
|
|
|
|
return results |
|
|
return results |
|
|
|
|
|
|
|
|
def getInfo(self, identifier = None): |
|
|
def getInfo(self, identifier = None, extended = True): |
|
|
|
|
|
|
|
|
if not identifier: |
|
|
if not identifier: |
|
|
return {} |
|
|
return {} |
|
@ -73,14 +73,14 @@ class TheMovieDb(MovieProvider): |
|
|
try: |
|
|
try: |
|
|
log.debug('Getting info: %s', cache_key) |
|
|
log.debug('Getting info: %s', cache_key) |
|
|
movie = tmdb3.Movie(identifier) |
|
|
movie = tmdb3.Movie(identifier) |
|
|
result = self.parseMovie(movie) |
|
|
result = self.parseMovie(movie, with_actors = extended) |
|
|
self.setCache(cache_key, result) |
|
|
self.setCache(cache_key, result) |
|
|
except: |
|
|
except: |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
return result |
|
|
return result |
|
|
|
|
|
|
|
|
def parseMovie(self, movie, with_titles = True): |
|
|
def parseMovie(self, movie, with_titles = True, with_actors = True): |
|
|
|
|
|
|
|
|
cache_key = 'tmdb.cache.%s' % movie.id |
|
|
cache_key = 'tmdb.cache.%s' % movie.id |
|
|
movie_data = self.getCache(cache_key) |
|
|
movie_data = self.getCache(cache_key) |
|
@ -112,6 +112,7 @@ class TheMovieDb(MovieProvider): |
|
|
|
|
|
|
|
|
# Gather actors data |
|
|
# Gather actors data |
|
|
actors = {} |
|
|
actors = {} |
|
|
|
|
|
if with_actors: |
|
|
for cast_item in movie.cast: |
|
|
for cast_item in movie.cast: |
|
|
try: |
|
|
try: |
|
|
actors[toUnicode(cast_item.name)] = toUnicode(cast_item.character) |
|
|
actors[toUnicode(cast_item.name)] = toUnicode(cast_item.character) |
|
|