mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 13:23:24 -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:
|
try:
|
||||||
info = json.loads(data)
|
info = json.loads(data)
|
||||||
except Exception as ex:
|
except Exception as e:
|
||||||
logger.warn(u"PlexPy WebSocket :: Error decoding message from websocket: %s" % ex)
|
logger.warn(u"PlexPy WebSocket :: Error decoding message from websocket: %s" % e)
|
||||||
logger.debug(data)
|
logger.debug(data)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
info = info.get('NotificationContainer', info)
|
||||||
type = info.get('type')
|
type = info.get('type')
|
||||||
|
|
||||||
if not type:
|
if not type:
|
||||||
|
@ -154,9 +155,9 @@ def process(opcode, data):
|
||||||
|
|
||||||
if type == 'playing':
|
if type == 'playing':
|
||||||
# logger.debug('%s.playing %s' % (name, info))
|
# logger.debug('%s.playing %s' % (name, info))
|
||||||
try:
|
time_line = info.get('PlaySessionStateNotification', info.get('_children'))
|
||||||
time_line = info.get('_children')
|
|
||||||
except:
|
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.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue