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,6 +277,14 @@ 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:
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 = {}
credentials['Servers'] = credentials.get('Servers', []) credentials['Servers'] = credentials.get('Servers', [])

View file

@ -36,7 +36,7 @@ class Setup(object):
if not self.get_web_server(): if not self.get_web_server():
set_setting = JSONRPC('Settings.SetSetingValue') set_setting = JSONRPC('Settings.SetSetingValue')
set_setting.execute({'setting': "services.webserverport", 'value': 50325}) set_setting.execute({'setting': "services.webserverport", 'value': 8080})
set_setting.execute({'setting': "services.webserver", 'value': True}) set_setting.execute({'setting': "services.webserver", 'value': True})
if not self.get_web_server(): if not self.get_web_server():