Fix library sync crash TypeError

- Fixes #436
This commit is contained in:
Croneter 2018-03-22 17:03:26 +01:00
parent 4e4e1cea6b
commit 1a7ac665db

View file

@ -230,7 +230,10 @@ class KodiDBMethods(object):
""" """
self.cursor.execute('SELECT idPath FROM files WHERE idFile = ? LIMIT 1', self.cursor.execute('SELECT idPath FROM files WHERE idFile = ? LIMIT 1',
(file_id,)) (file_id,))
path_id = self.cursor.fetchone()[0] try:
path_id = self.cursor.fetchone()[0]
except TypeError:
return
self.cursor.execute('DELETE FROM files WHERE idFile = ?', self.cursor.execute('DELETE FROM files WHERE idFile = ?',
(file_id,)) (file_id,))
self.cursor.execute('DELETE FROM bookmark WHERE idFile = ?', self.cursor.execute('DELETE FROM bookmark WHERE idFile = ?',