mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-09-02 12:51:35 +00:00
add exception and notification when not logged in
This commit is contained in:
parent
2dd0a9206d
commit
5b86aa1ca9
3 changed files with 10 additions and 2 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue