def update(self):
        import mpd
        try:
            self.status = self.client.status()
            self.currentsong = self.client.currentsong()
        except mpd.ConnectionError:
            self.client.connect(self.server, self.port)

            if self.password is not None:
                self.client.password(self.password)

            self.status = self.client.status()
            self.currentsong = self.client.currentsong()
Get all services for a given topic.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/media_player/mpd.py/MpdDevice.update--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/db/api.py/service_get_all_by_topic