On the UI, the song elapsed time is continuously updated. However the act_player_info does not update as the song plays. As example using the python redis library, if I start a new song playing and then execute the following...
python2
>>> import redis
>>> import json
>>>
>>> client = redis.Redis()
>>> json.loads(client.get("act_player_info"))['elapsed']
u'0'
>>> json.loads(client.get("act_player_info"))['elapsed']
u'0'
>>> json.loads(client.get("act_player_info"))['elapsed']
u'0'
>>> json.loads(client.get("act_player_info"))['elapsed']
u'0'
You can see that the elapsed value is not updated. If there is an event that occurs like volume change or change in playing song, act_player_info is updated, but a change in elapsed time does not appear to be an event that causes an update.
I did create a work around where I created my own timer that starts from elapsed whenever the act_player_info key is updated. This seems to work ok but I was wondering if there was a way to more directly control the availability of song metadata during playback. How does the UI manage to keep the elapsed time updated?