'Wrapper for requests to the MPD server. Tries to re-connect if the
connection was lost (f.ex. during MPD\'s library refresh).'

def get(self, command, retries=RETRIES):

    try:
        return getattr(self.client, command)()
    except (select.error, mpd.ConnectionError) as err:
        self._log.error(u'{0}', err)
    if (retries <= 0):
        raise ui.UserError(u'communication    with    MPD    server    failed')
    time.sleep(RETRY_INTERVAL)
    try:
        self.disconnect()
    except mpd.ConnectionError:
        pass
    self.connect()
    return self.get(command, retries=(retries - 1))
