diff --git a/resources/lib/database/__init__.py b/resources/lib/database/__init__.py index 45abd2c9..e420344a 100644 --- a/resources/lib/database/__init__.py +++ b/resources/lib/database/__init__.py @@ -227,7 +227,12 @@ def get_sync(): with open(os.path.join(path, 'sync.json')) as infile: sync = json.load(infile) except Exception: - sync = {'Libraries': [], 'RestorePoint': {}, 'Whitelist': []} + sync = {} + + sync['Libraries'] = sync.get('Libraries', []) + sync['RestorePoint'] = sync.get('RestorePoint', {}) + sync['Whitelist'] = sync.get('Whitelist', []) + sync['SortedViews'] = sync.get('SortedViews', []) return sync @@ -254,7 +259,9 @@ def get_credentials(): with open(os.path.join(path, 'data.json')) as infile: credentials = json.load(infile) except Exception: - credentials = {'Servers': []} + credentials = {} + + credentials['Servers'] = credentials.get('Servers', []) return credentials diff --git a/resources/lib/helper/loghandler.py b/resources/lib/helper/loghandler.py index ef437f33..c416d736 100644 --- a/resources/lib/helper/loghandler.py +++ b/resources/lib/helper/loghandler.py @@ -3,6 +3,7 @@ ################################################################################################## import logging + import xbmc import database