mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Fix websocket timeline json
This commit is contained in:
parent
d7cef5add7
commit
e31e531f9c
1 changed files with 5 additions and 6 deletions
|
@ -178,8 +178,7 @@ def process(opcode, data):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if type == 'playing':
|
if type == 'playing':
|
||||||
# logger.debug('%s.playing %s' % (name, info))
|
time_line = info.get('PlaySessionStateNotification', info.get('_children', {}))
|
||||||
time_line = info.get('PlaySessionStateNotification', info.get('_children'))
|
|
||||||
|
|
||||||
if not time_line:
|
if not time_line:
|
||||||
logger.debug(u"PlexPy WebSocket :: Session found but unable to get timeline data.")
|
logger.debug(u"PlexPy WebSocket :: Session found but unable to get timeline data.")
|
||||||
|
@ -189,13 +188,13 @@ def process(opcode, data):
|
||||||
activity.process()
|
activity.process()
|
||||||
|
|
||||||
if type == 'timeline':
|
if type == 'timeline':
|
||||||
try:
|
time_line = info.get('TimelineEntry', info.get('_children', {}))
|
||||||
children = info.get('_children')
|
|
||||||
except:
|
if not time_line:
|
||||||
logger.debug(u"PlexPy WebSocket :: Timeline event found but unable to get timeline data.")
|
logger.debug(u"PlexPy WebSocket :: Timeline event found but unable to get timeline data.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
activity = activity_handler.TimelineHandler(timeline=children[0])
|
activity = activity_handler.TimelineHandler(timeline=time_line[0])
|
||||||
activity.process()
|
activity.process()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue