From 708b042af6722cefdd230b6785c2ebb92c092497 Mon Sep 17 00:00:00 2001 From: im85288 Date: Wed, 15 Jul 2015 21:05:12 +0100 Subject: [PATCH] fix cast order - isengard only --- addon.xml | 2 +- resources/lib/WriteKodiVideoDB.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addon.xml b/addon.xml index 63cee45a..5b3c6279 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 239aa0d2..d70091ac 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -810,11 +810,10 @@ class WriteKodiVideoDB(): kodiVersion = 15 if(people != None): - for person in people: - + castorder = 1 + for person in people: Name = person.get("Name") actorid = None - # Get existing actor if kodiVersion == 15: # Kodi Isengard database # @@ -858,8 +857,9 @@ class WriteKodiVideoDB(): Role = person.get("Role") if kodiVersion == 15: # Kodi Isengard database # - peoplesql="INSERT OR REPLACE into actor_link(actor_id, media_id, media_type,role) values(?, ?, ?, ?)" - cursor.execute(peoplesql, (actorid, id, mediatype, Role)) + peoplesql="INSERT OR REPLACE into actor_link(actor_id, media_id, media_type,role,cast_order) values(?, ?, ?, ?, ?)" + cursor.execute(peoplesql, (actorid, id, mediatype, Role, castorder)) + castorder = castorder + 1 else: # Kodi Gotham or Helix database # if mediatype == "movie":