Enable PKC to use Kodi DB index "ix_files"

This commit is contained in:
croneter 2018-11-07 13:31:38 +01:00
parent 015451d2fd
commit 3d837fcf33

View file

@ -191,8 +191,8 @@ class KodiDBMethods(object):
Adds the filename [unicode] to the table files if not already added Adds the filename [unicode] to the table files if not already added
and returns the idFile. and returns the idFile.
""" """
query = 'SELECT idFile FROM files WHERE strFilename = ? AND idPath = ?' query = 'SELECT idFile FROM files WHERE idPath = ? AND strFilename = ?'
self.cursor.execute(query, (filename, path_id)) self.cursor.execute(query, (path_id, filename))
try: try:
file_id = self.cursor.fetchone()[0] file_id = self.cursor.fetchone()[0]
except TypeError: except TypeError: