From: Santiago Soto Date: Wed, 30 Apr 2025 23:07:27 +0000 (-0300) Subject: Improve error handling in SnapCast player removal and update snapcast dependency... X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=b1ef53b9a03d950bc39e3baf659d011d432f566c;p=music-assistant-server.git Improve error handling in SnapCast player removal and update snapcast dependency to 2.3.7 --- diff --git a/music_assistant/providers/snapcast/__init__.py b/music_assistant/providers/snapcast/__init__.py index 5a6e9d6a..ee415925 100644 --- a/music_assistant/providers/snapcast/__init__.py +++ b/music_assistant/providers/snapcast/__init__.py @@ -460,10 +460,11 @@ class SnapCastProvider(PlayerProvider): async def remove_player(self, player_id: str) -> None: """Remove the client from the snapserver when it is deleted.""" - try: - await self._snapserver.delete_client(self._get_snapclient_id(player_id)) - except TypeError as err: - self.logger.warning("Unable to remove snapclient %s: %s", player_id, str(err)) + result, error = await self._snapserver.delete_client(self._get_snapclient_id(player_id)) + if result: + self.logger.debug("Snapclient removed %s", player_id) + else: + self.logger.warning("Unable to remove snapclient %s: %s", player_id, error) async def cmd_volume_set(self, player_id: str, volume_level: int) -> None: """Send VOLUME_SET command to given player.""" diff --git a/music_assistant/providers/snapcast/manifest.json b/music_assistant/providers/snapcast/manifest.json index 9cb5ffba..82f0d023 100644 --- a/music_assistant/providers/snapcast/manifest.json +++ b/music_assistant/providers/snapcast/manifest.json @@ -5,7 +5,7 @@ "description": "Support for snapcast server and clients.", "codeowners": ["@SantiagoSotoC"], "requirements": [ - "snapcast==2.3.6", + "snapcast==2.3.7", "bidict==0.23.1", "websocket-client==1.8.0" ], diff --git a/requirements_all.txt b/requirements_all.txt index 5d34d5a6..fb453c2b 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -47,7 +47,7 @@ pywidevine==1.8.0 radios==0.3.2 setuptools>=1.0.0 shortuuid==1.0.13 -snapcast==2.3.6 +snapcast==2.3.7 soco==0.30.9 soundcloudpy==0.1.2 sxm==0.2.8