Follow up for the new feature

Added a short notification to indicate to users success or error.
This commit is contained in:
angelblue05 2015-05-05 22:20:29 -05:00
parent 0501622b59
commit cdd6239736

View file

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