From 2c2c6a0958b85e02a56ca6f7cf1e10aedf4758cf Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 9 Jul 2018 17:35:48 -0500 Subject: [PATCH] Fix role error If trailer has people defined but not their roles. --- resources/lib/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/api.py b/resources/lib/api.py index 40bc7be4..ed53ee66 100644 --- a/resources/lib/api.py +++ b/resources/lib/api.py @@ -107,9 +107,9 @@ class API(object): if person['Type'] == "Actor": cast.append({ 'name': person['Name'], - 'role': person['Role'], + 'role': person.get('Role', "Unknown"), 'order': len(cast) + 1, - 'thumbnail': person['imageurl'] + 'thumbnail': person.get('imageurl') }) return cast