From ea941ed6b4bbcfb16a08eba4ef27ef868384916e Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 15 Sep 2015 07:48:42 -0500 Subject: [PATCH] Fix for add people --- resources/lib/WriteKodiVideoDB.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index ad605e7f..e717e5bf 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -895,6 +895,7 @@ class WriteKodiVideoDB(): cursor.execute(query, (actorid, name)) finally: + query = "" # Add person image to art table thumb = API().imageUrl(person['Id'], "Primary", 0, 400, 400) if thumb: @@ -949,7 +950,8 @@ class WriteKodiVideoDB(): elif "episode" in mediatype: query = "INSERT OR REPLACE INTO directorlinkepisode(idDirector, idEpisode) values(?, ?)" - cursor.execute(query, (actorid, id)) + if query: + cursor.execute(query, (actorid, id)) elif type in ("Writing", "Writer"): @@ -958,7 +960,8 @@ class WriteKodiVideoDB(): elif "episode" in mediatype: query = "INSERT OR REPLACE INTO writerlinkepisode(idWriter, idEpisode) values(?, ?)" - cursor. execute(query, (actorid, id)) + if query: + cursor. execute(query, (actorid, id)) def AddGenresToMedia(self, id, genres, mediatype, cursor):