Fix resume for episodes for add-on paths

This commit is contained in:
croneter 2018-12-21 19:02:36 +01:00
parent 512479e47e
commit 7966dd5ee4

View file

@ -605,8 +605,16 @@ class KodiVideoDB(common.KodiDBBase):
# .tvshows/<plex show id/! # .tvshows/<plex show id/!
self.cursor.execute('SELECT strFilename FROM files WHERE idFile = ? LIMIT 1', self.cursor.execute('SELECT strFilename FROM files WHERE idFile = ? LIMIT 1',
(file_id, )) (file_id, ))
for new_id in self.cursor.execute('SELECT idFile FROM files WHERE strFilename = ? LIMIT 2', try:
(self.cursor.fetchone()[0], )): filename = self.cursor.fetchone()[0]
except TypeError:
LOG.error('Did not get a filename, aborting for file_id %s',
file_id)
return
self.cursor.execute('SELECT idFile FROM files WHERE strFilename = ? LIMIT 2',
(filename, ))
file_ids = self.cursor.fetchall()
for new_id in file_ids:
self.set_resume(new_id[0], resume_seconds, total_seconds, self.set_resume(new_id[0], resume_seconds, total_seconds,
playcount, dateplayed, None) playcount, dateplayed, None)
return return