mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Manual merge of v1.4.16 into v2
This commit is contained in:
commit
d7cef5add7
5 changed files with 21 additions and 10 deletions
|
@ -1,2 +1,2 @@
|
|||
PLEXPY_BRANCH = "master"
|
||||
PLEXPY_RELEASE_VERSION = "1.4.15"
|
||||
PLEXPY_RELEASE_VERSION = "1.4.16"
|
||||
|
|
|
@ -166,11 +166,12 @@ def process(opcode, data):
|
|||
|
||||
try:
|
||||
info = json.loads(data)
|
||||
except Exception as ex:
|
||||
logger.warn(u"PlexPy WebSocket :: Error decoding message from websocket: %s" % ex)
|
||||
except Exception as e:
|
||||
logger.warn(u"PlexPy WebSocket :: Error decoding message from websocket: %s" % e)
|
||||
logger.debug(data)
|
||||
return False
|
||||
|
||||
info = info.get('NotificationContainer', info)
|
||||
type = info.get('type')
|
||||
|
||||
if not type:
|
||||
|
@ -178,13 +179,13 @@ def process(opcode, data):
|
|||
|
||||
if type == 'playing':
|
||||
# logger.debug('%s.playing %s' % (name, info))
|
||||
try:
|
||||
children = info.get('_children')
|
||||
except:
|
||||
time_line = info.get('PlaySessionStateNotification', info.get('_children'))
|
||||
|
||||
if not time_line:
|
||||
logger.debug(u"PlexPy WebSocket :: Session found but unable to get timeline data.")
|
||||
return False
|
||||
|
||||
activity = activity_handler.ActivityHandler(timeline=children[0])
|
||||
activity = activity_handler.ActivityHandler(timeline=time_line[0])
|
||||
activity.process()
|
||||
|
||||
if type == 'timeline':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue