* @param updatePolledPropertiesOnly
* If updatePolledPropertiesOnly is true, only update the Player properties that need to be polled
* If updatePolledPropertiesOnly is false, update the Player state itself as well
*/
public void updatePlayerStatus(final boolean updatePolledPropertiesOnly) {
final PlayerGetActivePlayers activePlayers = new PlayerGetActivePlayers(client, httpUri);
activePlayers.execute(new Runnable() {
@Override
public void run() {
if (activePlayers.isPlaying()) {
if (!updatePolledPropertiesOnly) {
updateState(State.Play);
}
requestPlayerUpdate(activePlayers.getPlayerId(), updatePolledPropertiesOnly);
} else {
if (!updatePolledPropertiesOnly) {
updateState(State.Stop);
}
}