start and stop the service with user login and logoff
reset user and token when a user loggs off
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.embycon"
|
||||
name="EmbyCon"
|
||||
version="1.1.1"
|
||||
version="1.1.3"
|
||||
provider-name="null_pointer">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
@@ -9,7 +9,7 @@
|
||||
<extension point="xbmc.python.pluginsource" library="default.py">
|
||||
<provides>executable video audio image</provides>
|
||||
</extension>
|
||||
<extension point="xbmc.service" library="service.py" start="startup">
|
||||
<extension point="xbmc.service" library="service.py" start="login">
|
||||
</extension>
|
||||
<extension point="xbmc.addon.metadata">
|
||||
<platform>all</platform>
|
||||
|
||||
@@ -140,7 +140,12 @@ while not xbmc.abortRequested:
|
||||
|
||||
xbmc.sleep(1000)
|
||||
xbmcgui.Window(10000).setProperty("EmbyCon_Service_Timestamp", str(int(time.time())))
|
||||
|
||||
|
||||
# clear user and token when loggin off
|
||||
WINDOW = xbmcgui.Window(10000)
|
||||
WINDOW.clearProperty("userid")
|
||||
WINDOW.clearProperty("AccessToken")
|
||||
|
||||
# stop the WebSocket client
|
||||
websocket_thread.stopClient()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user