mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +00:00
Follow up for the new feature
Added a short notification to indicate to users success or error.
This commit is contained in:
parent
0501622b59
commit
cdd6239736
1 changed files with 3 additions and 0 deletions
|
@ -89,6 +89,7 @@ def addUser():
|
||||||
url = "{server}/mediabrowser/Sessions/%s/Users/%s" % (sessionId, selected_userId)
|
url = "{server}/mediabrowser/Sessions/%s/Users/%s" % (sessionId, selected_userId)
|
||||||
postdata = {}
|
postdata = {}
|
||||||
doUtils.downloadUrl(url, postBody=postdata, type="DELETE")
|
doUtils.downloadUrl(url, postBody=postdata, type="DELETE")
|
||||||
|
xbmcgui.Dialog().notification("Success!", "%s removed from viewing session" % selected, time=1000)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
@ -113,9 +114,11 @@ def addUser():
|
||||||
url = "{server}/mediabrowser/Sessions/%s/Users/%s" % (sessionId, selected_userId)
|
url = "{server}/mediabrowser/Sessions/%s/Users/%s" % (sessionId, selected_userId)
|
||||||
postdata = {}
|
postdata = {}
|
||||||
doUtils.downloadUrl(url, postBody=postdata, type="POST")
|
doUtils.downloadUrl(url, postBody=postdata, type="POST")
|
||||||
|
xbmcgui.Dialog().notification("Success!", "%s added to viewing session" % selected, time=1000)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
xbmc.log("Failed to add user to session.")
|
xbmc.log("Failed to add user to session.")
|
||||||
|
xbmcgui.Dialog().notification("Error", "Unable to add/remove user from the session.", xbmcgui.NOTIFICATION_ERROR)
|
||||||
|
|
||||||
##### BROWSE EMBY CHANNELS #####
|
##### BROWSE EMBY CHANNELS #####
|
||||||
def BrowseChannels(id, folderid=None):
|
def BrowseChannels(id, folderid=None):
|
||||||
|
|
Loading…
Reference in a new issue