Fix duplicate artist links

INSERT OR REPLACE does not work when null values are provided as part of the unique index
This commit is contained in:
GrégoireDruant 2023-06-13 13:44:23 +02:00
commit 7f11de708f
2 changed files with 9 additions and 2 deletions

View file

@ -150,8 +150,8 @@ class Kodi(object):
bulk_updates.setdefault(sql, []).append((person_id,) + args)
elif person['Type'] == 'Artist':
sql = QU.update_link.replace("{LinkType}", 'actor_link')
bulk_updates.setdefault(sql, []).append((person_id,) + args)
sql = QU.insert_link_if_not_exists.replace("{LinkType}", 'actor_link')
bulk_updates.setdefault(sql, []).append((person_id,) + args + (person_id,) + args)
add_thumbnail(person_id, person, person['Type'])