Hack to check for live tv stopped websocket event

This commit is contained in:
JonnyWong16 2018-05-27 14:04:47 -07:00
parent 94b00c75c2
commit 1245b4fbd3

View file

@ -43,6 +43,9 @@ class ActivityHandler(object):
if 'sessionKey' in self.timeline: if 'sessionKey' in self.timeline:
if str(self.timeline['sessionKey']).isdigit(): if str(self.timeline['sessionKey']).isdigit():
return True return True
# Hack since sessionKey is not in the live TV stopped event
elif self.timeline.get('key', '').startswith('/livetv/sessions') and self.timeline.get('state') == 'stopped':
return True
return False return False