Also update volume and mute on PMS updates

This commit is contained in:
croneter 2017-12-14 17:19:09 +01:00
parent 7100802cab
commit bb0ba08329

View file

@ -141,7 +141,11 @@ class SubscriptionMgr(object):
return ' <Timeline state="stopped" controllable="%s" type="%s" ' \ return ' <Timeline state="stopped" controllable="%s" type="%s" ' \
'itemType="%s" />\n' % (CONTROLLABLE[ptype], ptype, ptype) 'itemType="%s" />\n' % (CONTROLLABLE[ptype], ptype, ptype)
playerid = player['playerid'] playerid = player['playerid']
# Update our PKC state of how the player actually looks like
state.PLAYER_STATES[playerid].update(js.get_player_props(playerid)) state.PLAYER_STATES[playerid].update(js.get_player_props(playerid))
state.PLAYER_STATES[playerid]['volume'] = js.get_volume()
state.PLAYER_STATES[playerid]['muted'] = js.get_muted()
# Get the message together to send to Plex
info = state.PLAYER_STATES[playerid] info = state.PLAYER_STATES[playerid]
status = 'paused' if info['speed'] == '0' else 'playing' status = 'paused' if info['speed'] == '0' else 'playing'
ret = ' <Timeline state="%s"' % status ret = ' <Timeline state="%s"' % status