- async def _hello(self) -> None:
- """Consume HELLO_PREFIX"""
- self.in_use = True
- data = await self.readuntil(b'\n')
- rcv = data.decode('utf-8')
- if not rcv.startswith(HELLO_PREFIX):
- raise MPDProtocolError(f'Got invalid MPD hello: "{rcv}"')
- log.debug('consumed hello prefix: %r', rcv)
- self.version = rcv.split('\n')[0][len(HELLO_PREFIX):]
-