def version(self):
"""MPD protocol version"""
host = (self.host, self.port)
- version = {_.version for _ in self._pool._connections.get(host, [])}
+ version = {_.version for _ in self.connections}
if not version:
log.warning('No connections yet in the connections pool for %s', host)
return ''
log.warning('More than one version in the connections pool for %s', host)
return version.pop()
+ @property
+ def connections(self):
+ """Open connections"""
+ host = (self.host, self.port)
+ return self._pool._connections.get(host, [])
+
async def close(self):
await self._pool.close()
parts.append(f'"{escape(str(arg))}"')
if '\n' in ' '.join(parts):
raise MPDCommandError('new line found in the command!')
- log.debug(' '.join(parts))
+ #log.debug(' '.join(parts))
await self._write_line(' '.join(parts))
async def _read_binary(self, amount):