Fix Alexa thread suspend
This commit is contained in:
parent
8b99247ba5
commit
7a174f5a7e
1 changed files with 12 additions and 1 deletions
|
@ -209,7 +209,6 @@ class PMS_Websocket(WebSocket):
|
||||||
window('plex_online', value='false')
|
window('plex_online', value='false')
|
||||||
|
|
||||||
|
|
||||||
@thread_methods(add_suspends=['RESTRICTED_USER', 'PLEX_TOKEN'])
|
|
||||||
class Alexa_Websocket(WebSocket):
|
class Alexa_Websocket(WebSocket):
|
||||||
"""
|
"""
|
||||||
Websocket connection to talk to Amazon Alexa
|
Websocket connection to talk to Amazon Alexa
|
||||||
|
@ -248,3 +247,15 @@ class Alexa_Websocket(WebSocket):
|
||||||
|
|
||||||
def IOError_response(self):
|
def IOError_response(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def thread_suspended(self):
|
||||||
|
"""
|
||||||
|
Overwrite method since we need to check for plex token
|
||||||
|
"""
|
||||||
|
if self.__thread_suspended is True:
|
||||||
|
return True
|
||||||
|
if not state.PLEX_TOKEN:
|
||||||
|
return True
|
||||||
|
if state.RESTRICTED_USER:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
Loading…
Add table
Reference in a new issue