Merge pull request #1683 from croneter/py3-fix-unbound

Fix UnboundLocalError: local variable 'identifier' referenced before assignment
This commit is contained in:
croneter 2021-10-30 18:44:20 +02:00 committed by GitHub
commit 902c56b8f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -611,6 +611,8 @@ class KodiVideoDB(common.KodiDBBase):
identifier = 'idMovie' identifier = 'idMovie'
elif kodi_type == v.KODI_TYPE_EPISODE: elif kodi_type == v.KODI_TYPE_EPISODE:
identifier = 'idEpisode' identifier = 'idEpisode'
else:
return
self.cursor.execute('SELECT idFile FROM %s WHERE %s = ? LIMIT 1' self.cursor.execute('SELECT idFile FROM %s WHERE %s = ? LIMIT 1'
% (kodi_type, identifier), (kodi_id, )) % (kodi_type, identifier), (kodi_id, ))
try: try: