Add option to generate a new device Id

This commit is contained in:
angelblue05 2016-02-28 23:20:59 -06:00
parent a0acdd6a7a
commit dfa5c7b313
5 changed files with 35 additions and 2 deletions

View file

@ -94,6 +94,30 @@ def doMainListing():
xbmcplugin.endOfDirectory(int(sys.argv[1]))
##### Generate a new deviceId
def resetDeviceId():
dialog = xbmcgui.Dialog()
language = utils.language
deviceId_old = utils.window('emby_deviceId')
try:
utils.window('emby_deviceId', clear=True)
deviceId = clientinfo.ClientInfo().getDeviceId(reset=True)
except Exception as e:
utils.logMsg("EMBY", "Failed to generate a new device Id: %s" % e, 1)
dialog.ok(
heading="Emby for Kodi",
line1=language(33032))
else:
utils.logMsg("EMBY", "Successfully removed old deviceId: %s New deviceId: %s"
% (deviceId_old, deviceId), 1)
dialog.ok(
heading="Emby for Kodi",
line1=language(33033))
xbmc.executebuiltin('RestartApp')
##### ADD ADDITIONAL USERS #####
def addUser():