mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-13 21:56:11 +00:00
Ensure file properties exists
For credentials and sync information
This commit is contained in:
parent
b35c7b5715
commit
5f9c071c39
2 changed files with 10 additions and 2 deletions
|
@ -227,7 +227,12 @@ def get_sync():
|
||||||
with open(os.path.join(path, 'sync.json')) as infile:
|
with open(os.path.join(path, 'sync.json')) as infile:
|
||||||
sync = json.load(infile)
|
sync = json.load(infile)
|
||||||
except Exception:
|
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
|
return sync
|
||||||
|
|
||||||
|
@ -254,7 +259,9 @@ def get_credentials():
|
||||||
with open(os.path.join(path, 'data.json')) as infile:
|
with open(os.path.join(path, 'data.json')) as infile:
|
||||||
credentials = json.load(infile)
|
credentials = json.load(infile)
|
||||||
except Exception:
|
except Exception:
|
||||||
credentials = {'Servers': []}
|
credentials = {}
|
||||||
|
|
||||||
|
credentials['Servers'] = credentials.get('Servers', [])
|
||||||
|
|
||||||
return credentials
|
return credentials
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import xbmc
|
import xbmc
|
||||||
|
|
||||||
import database
|
import database
|
||||||
|
|
Loading…
Reference in a new issue