diff --git a/couchpotato/core/providers/info/_modifier/main.py b/couchpotato/core/providers/info/_modifier/main.py index daf2a306..c7e3a5ef 100644 --- a/couchpotato/core/providers/info/_modifier/main.py +++ b/couchpotato/core/providers/info/_modifier/main.py @@ -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): diff --git a/couchpotato/core/providers/info/themoviedb/main.py b/couchpotato/core/providers/info/themoviedb/main.py index 82daa5cb..c04a8820 100644 --- a/couchpotato/core/providers/info/themoviedb/main.py +++ b/couchpotato/core/providers/info/themoviedb/main.py @@ -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())) diff --git a/couchpotato/core/providers/metadata/xbmc/main.py b/couchpotato/core/providers/metadata/xbmc/main.py index 4c547c35..93e717f8 100644 --- a/couchpotato/core/providers/metadata/xbmc/main.py +++ b/couchpotato/core/providers/metadata/xbmc/main.py @@ -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', []):