Transfer data.txt to data.json

Use default port for webserver caching
This commit is contained in:
angelblue05 2018-09-18 04:53:14 -05:00
parent b9f8f05ea7
commit 21e780715e
2 changed files with 10 additions and 2 deletions

View file

@ -277,7 +277,15 @@ def get_credentials():
with open(os.path.join(path, 'data.json')) as infile:
credentials = json.load(infile)
except Exception:
credentials = {}
try:
with open(os.path.join(path, 'data.txt')) as infile:
credentials = json.load(infile)
save_credentials(credentials)
xbmcvfs.delete(os.path.join(path, 'data.txt'))
except Exception:
credentials = {}
credentials['Servers'] = credentials.get('Servers', [])