diff --git a/addon.xml b/addon.xml index 5a3c26c..00f654b 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/functions.py b/resources/lib/functions.py index d8943fb..f5c4bef 100644 --- a/resources/lib/functions.py +++ b/resources/lib/functions.py @@ -935,6 +935,9 @@ def getWigetContent(handle, params): log.debug("Recent(Items) jsonData: " + jsonData) result = json.loads(jsonData) + if result is None: + return [] + result = result.get("Items") if (result == None): result = [] diff --git a/resources/lib/menu_functions.py b/resources/lib/menu_functions.py index 2025f81..9cd80db 100644 --- a/resources/lib/menu_functions.py +++ b/resources/lib/menu_functions.py @@ -143,6 +143,7 @@ def displaySections(): addMenuDirectoryItem(i18n('movies_az'), "plugin://plugin.video.embycon/?mode=MOVIE_ALPHA") addMenuDirectoryItem(i18n('search'), "plugin://plugin.video.embycon/?mode=SEARCH") + addMenuDirectoryItem(i18n('detect_server'), "plugin://plugin.video.embycon/?mode=DETECT_SERVER_USER") addMenuDirectoryItem(i18n('change_user'), "plugin://plugin.video.embycon/?mode=CHANGE_USER") addMenuDirectoryItem(i18n('show_settings'), "plugin://plugin.video.embycon/?mode=SHOW_SETTINGS") addMenuDirectoryItem(i18n('set_default_views'), "plugin://plugin.video.embycon/?mode=SET_DEFAULT_VIEWS") diff --git a/resources/lib/server_detect.py b/resources/lib/server_detect.py index 846dd52..5542a61 100644 --- a/resources/lib/server_detect.py +++ b/resources/lib/server_detect.py @@ -25,6 +25,7 @@ def getServerDetails(): MESSAGE = "who is EmbyServer?" MULTI_GROUP = ("", 7359) + #MULTI_GROUP = ("127.0.0.1", 7359) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.settimeout(4.0) @@ -74,7 +75,7 @@ def checkServer(force=False, change_user=False, notify=False): if serverNames: return_index = xbmcgui.Dialog().select(i18n('select_server'), serverNames) else: - xbmcgui.Dialog().notification(__addon_name__, i18n('no_server_detected'), icon='special://home/addons/plugin.video.embycon/icon.png') + xbmcgui.Dialog().ok(__addon_name__, i18n('no_server_detected')) return_index = -1 if (return_index == -1): @@ -115,6 +116,8 @@ def checkServer(force=False, change_user=False, notify=False): log.debug("jsonData : " + str(jsonData)) result = json.loads(jsonData) + if result is None: + result = [] names = [] user_list = [] diff --git a/resources/lib/translation.py b/resources/lib/translation.py index 88ef0f8..b320b74 100644 --- a/resources/lib/translation.py +++ b/resources/lib/translation.py @@ -91,4 +91,5 @@ STRINGS = { 'play_next_title': 30283, 'play_next_question': 30284, '_next_up': 30278, + 'detect_server' : 30011, }