Update websocket and handler for timeline events

This commit is contained in:
Jonathan Wong
2015-10-20 22:40:48 -07:00
parent 32cf1ada8b
commit 1c58a47073
2 changed files with 58 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
# This file is part of PlexPy.
# This file is part of PlexPy.
#
# PlexPy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -139,4 +139,14 @@ def process(opcode, data):
activity = activity_handler.ActivityHandler(timeline=time_line[0])
activity.process()
if type == 'timeline':
try:
time_line = info.get('_children')
except:
logger.debug(u"PlexPy WebSocket :: Timeline event found but unable to get timeline data.")
return False
activity = activity_handler.TimelineHandler(timeline=time_line[0])
activity.process()
return True