use a popup ok dialog instead of a notification

check for null on return of download function
This commit is contained in:
sfaulds
2017-06-22 17:18:39 +10:00
parent cb3cd603b4
commit 088b686a62
5 changed files with 10 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.embycon"
name="EmbyCon"
version="1.3.3"
version="1.3.4"
provider-name="Team B">
<requires>
<import addon="xbmc.python" version="2.1.0"/>

View File

@@ -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 = []

View File

@@ -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")

View File

@@ -25,6 +25,7 @@ def getServerDetails():
MESSAGE = "who is EmbyServer?"
MULTI_GROUP = ("<broadcast>", 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 = []

View File

@@ -91,4 +91,5 @@ STRINGS = {
'play_next_title': 30283,
'play_next_question': 30284,
'_next_up': 30278,
'detect_server' : 30011,
}