diff --git a/addon.xml b/addon.xml index 69bdafbb..ec17d9b5 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ diff --git a/resources/lib/database.py b/resources/lib/database.py index ec4906a9..da417e2f 100644 --- a/resources/lib/database.py +++ b/resources/lib/database.py @@ -233,5 +233,5 @@ def db_reset(): dialog.ok(heading=language(29999), line1=language(33088)) xbmc.executebuiltin('RestartApp') - return xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xbmcgui.ListItem()) + #return xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xbmcgui.ListItem()) \ No newline at end of file diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index b9d55961..6a2acaf1 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -225,6 +225,14 @@ class DownloadUtils(object): 'headers': self.get_header(server_id, authenticate) }) + if not server['Server'] or not server['UserId']: + log.error("Server or UserId not set, not logged in, returning None") + xbmcgui.Dialog().notification(heading=lang(29999), + message="Not Logged In", + icon=xbmcgui.NOTIFICATION_ERROR, + time=5000) + raise internal_exceptions.ExceptionWrapper("Not Logged In") + # Replace for the real values url = url.replace("{server}", server['Server']) url = url.replace("{UserId}", server['UserId'])