From 864ae05d61c58936623d1230a17abc756adf4e2e Mon Sep 17 00:00:00 2001 From: Prinz23 Date: Tue, 8 Oct 2024 14:38:01 +0200 Subject: [PATCH] change sql var s to save use --- sickgear/tv.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sickgear/tv.py b/sickgear/tv.py index 4dda2e7c..3c2534d4 100644 --- a/sickgear/tv.py +++ b/sickgear/tv.py @@ -913,8 +913,8 @@ class Person(Referential): cl.extend([ ['UPDATE person_ids SET src_id = ? WHERE person_id = ? AND src = ?', [cur_ids, self.id, cur_src]], - ["INSERT INTO person_ids (src, src_id, person_id) SELECT %s, '%s', %s WHERE changes() == 0" - % (cur_src, cur_ids, self.id)] + ["INSERT INTO person_ids (src, src_id, person_id) SELECT ?, ?, ? WHERE changes() == 0", + [cur_src, cur_ids, self.id]] ]) if cl: r_id = my_db.mass_action(cl) @@ -1256,8 +1256,8 @@ class Character(Referential): ], [ """ INSERT INTO character_ids (src, src_id, character_id) - SELECT %s, %s, %s WHERE changes() == 0 - """ % (cur_tvid, cur_src_id, self.id)] + SELECT ?, ?, ? WHERE changes() == 0 + """, [cur_tvid, cur_src_id, self.id]] ]) # in case we don't have a character id yet, we need to fetch it for the next step @@ -1990,8 +1990,8 @@ class TVShow(TVShowBase): ], [ """ INSERT INTO castlist (indexer, indexer_id, character_id, sort_order, updated) - SELECT %s, %s, %s, %s, %s WHERE changes() == 0; - """ % (self.tvid, self.prodid, cur_cast.id, cur_enum, update_date)] + SELECT ?, ?, ?, ?, ? WHERE changes() == 0; + """, [self.tvid, self.prodid, cur_cast.id, cur_enum, update_date]] ]) if removed_char_ids: # remove orphaned entries