mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
fixed actor images in listings
This commit is contained in:
parent
67dba82324
commit
52a8345430
1 changed files with 16 additions and 7 deletions
|
@ -710,13 +710,11 @@ class WriteKodiDB():
|
|||
for person in people:
|
||||
|
||||
Name = person.get("Name")
|
||||
|
||||
actorid = None
|
||||
Thumb = downloadUtils.imageUrl(person.get("Id"), "Primary", 0, 400, 400)
|
||||
|
||||
# Get existing actor
|
||||
if kodiVersion == 15:
|
||||
# Kodi Isengard database #
|
||||
if Thumb != None:
|
||||
Thumb = "<thumb>" + Thumb + "</thumb>"
|
||||
cursor.execute("SELECT actor_id as actorid FROM actor WHERE name = ?",(Name,))
|
||||
else:
|
||||
# Kodi Gotham or Helix database #
|
||||
|
@ -730,15 +728,26 @@ class WriteKodiDB():
|
|||
cursor.execute("select coalesce(max(actor_id),0) as actorid from actor")
|
||||
actorid = cursor.fetchone()[0]
|
||||
actorid = actorid + 1
|
||||
peoplesql="insert into actor(actor_id, name, art_urls) values(?, ?, ?)"
|
||||
peoplesql="insert into actor(actor_id, name) values(?, ?)"
|
||||
else:
|
||||
# Kodi Gotham or Helix database #
|
||||
cursor.execute("select coalesce(max(idActor),0) as actorid from actors")
|
||||
actorid = cursor.fetchone()[0]
|
||||
actorid = actorid + 1
|
||||
peoplesql="insert into actors(idActor, strActor, strThumb) values(?, ?, ?)"
|
||||
peoplesql="insert into actors(idActor, strActor) values(?, ?)"
|
||||
utils.logMsg("AddPeopleToMedia", "Processing : " + person.get("Name"))
|
||||
cursor.execute(peoplesql, (actorid,Name,Thumb))
|
||||
cursor.execute(peoplesql, (actorid,Name))
|
||||
|
||||
### add people image to art table
|
||||
Thumb = downloadUtils.imageUrl(person.get("Id"), "Primary", 0, 400, 400)
|
||||
if Thumb:
|
||||
if(person.get("Type") == "Director"):
|
||||
arttype = "director"
|
||||
elif(person.get("Type") == "Writer" or person.get("Type") == "Writing"):
|
||||
arttype = "writer"
|
||||
else:
|
||||
arttype = "actor"
|
||||
self.addOrUpdateArt(Thumb, actorid, arttype, "thumb", cursor)
|
||||
|
||||
#### ACTORS ######
|
||||
if(person.get("Type") == "Actor"):
|
||||
|
|
Loading…
Reference in a new issue