'Restore snapshot for the player.'

@soco_error
def restore(self, with_group=True):

    from soco.exceptions import SoCoException
    try:
        self._soco_snapshot.restore(False)
    except (TypeError, AttributeError, SoCoException):
        _LOGGER.debug('Error    on    restore    %s', self.entity_id)
    if (with_group and self._snapshot_group):
        old = self._snapshot_group
        actual = self._player.group
        if (old.coordinator == actual.coordinator):
            if (self._player is not old.coordinator):
                self._coordinator.restore(False)
            remove = (actual.members - old.members)
            add = (old.members - actual.members)
            for soco_dev in list(remove):
                soco_dev.unjoin()
            for soco_dev in list(add):
                soco_dev.join(old.coordinator)
            return
        if (old.coordinator.group.coordinator == old.coordinator):
            self._player.join(old.coordinator)
            return
        old.coordinator.unjoin()
        coordinator = _get_entity_from_soco(self.hass, old.coordinator)
        coordinator.restore(False)
        for s_dev in list(old.members):
            if (s_dev != old.coordinator):
                s_dev.join(old.coordinator)
