From 3d837fcf33769c48afe599b3848b0b43dd136505 Mon Sep 17 00:00:00 2001 From: croneter Date: Wed, 7 Nov 2018 13:31:38 +0100 Subject: [PATCH] Enable PKC to use Kodi DB index "ix_files" --- resources/lib/kodidb_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/kodidb_functions.py b/resources/lib/kodidb_functions.py index b4f178c1..c857ec39 100644 --- a/resources/lib/kodidb_functions.py +++ b/resources/lib/kodidb_functions.py @@ -191,8 +191,8 @@ class KodiDBMethods(object): Adds the filename [unicode] to the table files if not already added and returns the idFile. """ - query = 'SELECT idFile FROM files WHERE strFilename = ? AND idPath = ?' - self.cursor.execute(query, (filename, path_id)) + query = 'SELECT idFile FROM files WHERE idPath = ? AND strFilename = ?' + self.cursor.execute(query, (path_id, filename)) try: file_id = self.cursor.fetchone()[0] except TypeError: