small fixes
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 22 Nov 2020 19:15:46 +0000 (20:15 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 22 Nov 2020 19:15:46 +0000 (20:15 +0100)
music_assistant/constants.py
music_assistant/managers/config.py
music_assistant/managers/players.py
music_assistant/web/websocket.py

index 1b643c849cfefad601482fe3e38d9ec7126a411c..a8ebba667cf97dab1748a00aa64d5fb2c7475980 100755 (executable)
@@ -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
index 5f24ee128d4b6e9d4f9106347baba3ad6e72ed4b..04b7d4c81a29902d537c64248426b569618ffa98 100755 (executable)
@@ -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]
index a277e30d484b91e3df51e3dbaef4503be20044dc..2dc1e1a72a62d6a295170e5974c3be1dfdeec83b 100755 (executable)
@@ -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
index 345dde6a989f21b10edc1d0fda70b19a6337815b..b851767f7d217ab4702906135852d3d4ca131225 100644 (file)
@@ -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."""