Move actor images to dict
This commit is contained in:
@@ -21,14 +21,17 @@ class MovieResultModifier(Plugin):
|
||||
'poster': [],
|
||||
'backdrop': [],
|
||||
'poster_original': [],
|
||||
'backdrop_original': []
|
||||
'backdrop_original': [],
|
||||
'actors': {}
|
||||
},
|
||||
'runtime': 0,
|
||||
'plot': '',
|
||||
'tagline': '',
|
||||
'imdb': '',
|
||||
'genres': [],
|
||||
'mpaa': None
|
||||
'mpaa': None,
|
||||
'actors': [],
|
||||
'actor_roles': {}
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -97,6 +97,7 @@ class TheMovieDb(MovieProvider):
|
||||
#'backdrop': [backdrop] if backdrop else [],
|
||||
'poster_original': [poster_original] if poster_original else [],
|
||||
'backdrop_original': [backdrop_original] if backdrop_original else [],
|
||||
'actors': {}
|
||||
}
|
||||
|
||||
# Genres
|
||||
@@ -116,7 +117,7 @@ class TheMovieDb(MovieProvider):
|
||||
for cast_item in movie.cast:
|
||||
try:
|
||||
actors[toUnicode(cast_item.name)] = toUnicode(cast_item.character)
|
||||
images['actor %s' % toUnicode(cast_item.name)] = self.getImage(cast_item, type = 'profile', size = 'original')
|
||||
images['actors'][toUnicode(cast_item.name)] = self.getImage(cast_item, type = 'profile', size = 'original')
|
||||
except:
|
||||
log.debug('Error getting cast info for %s: %s', (cast_item, traceback.format_exc()))
|
||||
|
||||
|
||||
@@ -98,9 +98,9 @@ class XBMC(MetaDataBase):
|
||||
if role_name:
|
||||
role = SubElement(actor, 'role')
|
||||
role.text = toUnicode(role_name)
|
||||
if movie_info['images'].get('actor %s' % actor_name, ''):
|
||||
if movie_info['images']['actors'].get(actor_name):
|
||||
thumb = SubElement(actor, 'thumb')
|
||||
thumb.text = toUnicode(movie_info['images'].get('actor %s' % actor_name))
|
||||
thumb.text = toUnicode(movie_info['images']['actors'].get(actor_name))
|
||||
|
||||
# Directors
|
||||
for director_name in movie_info.get('directors', []):
|
||||
|
||||
Reference in New Issue
Block a user