mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Don't crash when a user skips server setup
This commit is contained in:
parent
ac9db1b486
commit
49ce9e4359
1 changed files with 3 additions and 3 deletions
|
@ -58,10 +58,10 @@ class Events(object):
|
||||||
api_client = jellyfin_client.jellyfin
|
api_client = jellyfin_client.jellyfin
|
||||||
|
|
||||||
addon_data = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/data.json")
|
addon_data = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/data.json")
|
||||||
|
try:
|
||||||
with open(addon_data, 'rb') as infile:
|
with open(addon_data, 'rb') as infile:
|
||||||
data = json.load(infile)
|
data = json.load(infile)
|
||||||
|
|
||||||
try:
|
|
||||||
server_data = data['Servers'][0]
|
server_data = data['Servers'][0]
|
||||||
api_client.config.data['auth.server'] = server_data.get('address')
|
api_client.config.data['auth.server'] = server_data.get('address')
|
||||||
api_client.config.data['auth.server-name'] = server_data.get('Name')
|
api_client.config.data['auth.server-name'] = server_data.get('Name')
|
||||||
|
|
Loading…
Reference in a new issue