Speed up idPath look-up

This commit is contained in:
croneter 2018-11-07 13:33:16 +01:00
parent 3d837fcf33
commit 05c96dc1c6

View file

@ -134,7 +134,7 @@ class KodiDBMethods(object):
"""
if path is None:
path = ''
query = 'SELECT idPath FROM path WHERE strPath = ?'
query = 'SELECT idPath FROM path WHERE strPath = ? LIMIT 1'
self.cursor.execute(query, (path,))
try:
pathid = self.cursor.fetchone()[0]