"""All constants for Music Assistant."""
-__version__ = "0.0.66"
+__version__ = "0.0.67"
REQUIRED_PYTHON_VER = "3.8"
# configuration keys/attributes
super().__init__(conf_mgr, CONF_KEY_SECURITY)
# make sure the keys exist in config dict
if CONF_KEY_SECURITY not in conf_mgr.stored_config:
- conf_mgr.stored_config[CONF_KEY_SECURITY][CONF_KEY_SECURITY_APP_TOKENS] = {}
+ conf_mgr.stored_config[CONF_KEY_SECURITY] = {}
if (
CONF_KEY_SECURITY_APP_TOKENS
not in conf_mgr.stored_config[CONF_KEY_SECURITY]
:param player_id: player_id of the player to handle the command.
:param uri: Url/Uri that can be played by a player.
- :param queue_opt:
- QueueOption.Play -> Insert new items in queue and start playing at inserted position
- QueueOption.Replace -> Replace queue contents with these items
- QueueOption.Next -> Play item(s) after current playing item
- QueueOption.Add -> Append new items at end of the queue
"""
queue_item = QueueItem(item_id=uri, provider="uri", name=uri)
# generate uri for this queue item
"""Close websocket connection."""
try:
await self._ws.close(message=reason.encode())
- finally:
+ except Exception: # pylint: disable=broad-except
+ pass
+ try:
self.request.app["websockets"].remove(self)
- LOGGER.debug("websocket connection closed: %s", self.request.remote)
+ except Exception: # pylint: disable=broad-except
+ pass
+ LOGGER.debug("websocket connection closed: %s", self.request.remote)
async def handle_command(self, command: str, data: Optional[dict], id: Any = None):
"""Handle websocket command."""