From 9959806f5b98750dbacd251f4c70dc4c656900c8 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 25 Dec 2015 21:36:46 -0600 Subject: [PATCH] Fix boxset --- resources/lib/itemtypes.py | 9 +++++++-- resources/lib/read_embyserver.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index c978851f..faf7438a 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -521,8 +521,13 @@ class Movies(Items): if not current.get(itemid): # Assign boxset to movie emby_dbitem = emby_db.getItem_byId(itemid) - movieid = emby_dbitem[0] - self.logMsg("New addition to boxset %s: %s" % (title, movie['Name'])) + try: + movieid = emby_dbitem[0] + except TypeError: + self.logMsg("Failed to add: %s to boxset." % movie['Name'], 1) + continue + + self.logMsg("New addition to boxset %s: %s" % (title, movie['Name']), 1) kodi_db.assignBoxset(setid, movieid) # Update emby reference emby_db.updateParentId(itemid, setid) diff --git a/resources/lib/read_embyserver.py b/resources/lib/read_embyserver.py index a16882a0..967cc5d9 100644 --- a/resources/lib/read_embyserver.py +++ b/resources/lib/read_embyserver.py @@ -259,7 +259,7 @@ class Read_EmbyServer(): def getMovies_byBoxset(self, boxsetid): - items = self.getSection(boxsetid) + items = self.getSection(boxsetid, "Movie") return items