mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Fix websocket for new json response on PMS 1.3.0
This commit is contained in:
parent
8c7c0101cd
commit
82ac33dd75
1 changed files with 6 additions and 5 deletions
|
@ -142,11 +142,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:
|
||||
|
@ -154,9 +155,9 @@ def process(opcode, data):
|
|||
|
||||
if type == 'playing':
|
||||
# logger.debug('%s.playing %s' % (name, info))
|
||||
try:
|
||||
time_line = 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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue