From 2a689397e5fd4779e07dcdb3de723601d26e890a Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Fri, 11 Jan 2019 22:46:14 -0600 Subject: [PATCH] Fix discovery toggle --- resources/lib/database/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/lib/database/__init__.py b/resources/lib/database/__init__.py index 08721aed..d4ae3189 100644 --- a/resources/lib/database/__init__.py +++ b/resources/lib/database/__init__.py @@ -110,7 +110,6 @@ class Database(object): modified['file'] = file.decode('utf-8') LOG.info("Discovered database: %s", modified) - self.discovered = True return xbmc.translatePath("special://database/%s" % modified['file']).decode('utf-8') @@ -144,7 +143,12 @@ class Database(object): except Exception: pass - databases[file] = discovered if discovered and discovered != loaded else loaded + if discovered and discovered != loaded: + databases[file] = discovered + self.discovered = True + else: + databases[file] = loaded + databases['database_set%s' % file] = True LOG.info("Database locked in: %s", databases[file])