From: Marcel van der Veldt Date: Sun, 22 Nov 2020 19:15:46 +0000 (+0100) Subject: small fixes X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=20806a68a42e5203d88ee0b071fafe166675deba;p=music-assistant-server.git small fixes --- diff --git a/music_assistant/constants.py b/music_assistant/constants.py index 1b643c84..a8ebba66 100755 --- a/music_assistant/constants.py +++ b/music_assistant/constants.py @@ -1,6 +1,6 @@ """All constants for Music Assistant.""" -__version__ = "0.0.66" +__version__ = "0.0.67" REQUIRED_PYTHON_VER = "3.8" # configuration keys/attributes diff --git a/music_assistant/managers/config.py b/music_assistant/managers/config.py index 5f24ee12..04b7d4c8 100755 --- a/music_assistant/managers/config.py +++ b/music_assistant/managers/config.py @@ -384,7 +384,7 @@ class SecuritySettings(ConfigBaseItem): 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] diff --git a/music_assistant/managers/players.py b/music_assistant/managers/players.py index a277e30d..2dc1e1a7 100755 --- a/music_assistant/managers/players.py +++ b/music_assistant/managers/players.py @@ -331,11 +331,6 @@ class PlayerManager: :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 diff --git a/music_assistant/web/websocket.py b/music_assistant/web/websocket.py index 345dde6a..b851767f 100644 --- a/music_assistant/web/websocket.py +++ b/music_assistant/web/websocket.py @@ -78,9 +78,13 @@ class WebSocketHandler(View): """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."""