Fix db discovery

Ignore emby.db
This commit is contained in:
angelblue05 2019-01-11 00:39:23 -06:00
parent b34b48fdc1
commit 844732d778

View file

@ -62,11 +62,11 @@ class Database(object):
return self return self
def _get_database(self, path): def _get_database(self, path, silent=False):
path = xbmc.translatePath(path).decode('utf-8') path = xbmc.translatePath(path).decode('utf-8')
if not xbmcvfs.exists(path): if not xbmcvfs.exists(path) and not silent:
raise Exception("Database: %s missing" % path) raise Exception("Database: %s missing" % path)
return path return path
@ -110,6 +110,9 @@ class Database(object):
alt_file = "%s-%s" % (file, i) alt_file = "%s-%s" % (file, i)
try: try:
if file not in ('video', 'music', 'texture'):
return self._get_database(databases[file], True)
databases[file] = self._get_database(databases[alt_file]) databases[file] = self._get_database(databases[alt_file])
return databases[file] return databases[file]