From 64b9594bb79e87f33eb8ef0b8a0ff5aec0d95798 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Tue, 28 Jul 2015 01:16:24 +0200 Subject: [PATCH] small fix for episode adds --- resources/lib/WriteKodiVideoDB.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 03023f71..77912fa8 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -686,9 +686,9 @@ class WriteKodiVideoDB(): # Validate the path in database if self.directpath: - cursor.execute("SELECT idFile as fileid FROM files WHERE strFilename = ? and idPath = ?", (filename, pathid,)) + cursor.execute("SELECT idPath as pathid FROM path WHERE strPath = ?", (path,)) else: - cursor.execute("SELECT idFile as fileid FROM files WHERE strFilename LIKE ? and idPath = ?", (filename, embyId,)) + cursor.execute("SELECT idPath as pathid FROM path WHERE strPath LIKE ?", (seriesId,)) try: pathid = cursor.fetchone()[0] except: