From 11e5de378b3181bc1d445b2eda6c2909d711726c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 8 Oct 2016 05:06:26 -0500 Subject: [PATCH] Prevent crash missing productionlocations seems to be a new server bug --- resources/lib/itemtypes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 265f0cf3..72b660c1 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -486,7 +486,8 @@ class Movies(Items): kodicursor.execute(query, (pathid, filename, dateadded, fileid)) # Process countries - self.kodi_db.addCountries(movieid, item['ProductionLocations'], "movie") + if 'ProductionLocations' in item: + self.kodi_db.addCountries(movieid, item['ProductionLocations'], "movie") # Process cast people = artwork.get_people_artwork(item['People']) self.kodi_db.addPeople(movieid, people, "movie")