From: Eric Munson Date: Mon, 29 Jul 2024 10:29:30 +0000 (-0400) Subject: Subsonic: Add debug level logging around stream start, end, and details (#1523) X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=bd01c094a09c0b7f82732d45ebb0755fa416fb66;p=music-assistant-server.git Subsonic: Add debug level logging around stream start, end, and details (#1523) --- diff --git a/music_assistant/server/providers/opensubsonic/sonic_provider.py b/music_assistant/server/providers/opensubsonic/sonic_provider.py index cff871c2..a152b963 100644 --- a/music_assistant/server/providers/opensubsonic/sonic_provider.py +++ b/music_assistant/server/providers/opensubsonic/sonic_provider.py @@ -792,6 +792,13 @@ class OpenSonicProvider(MusicProvider): if mime_type.endswith("mpeg"): mime_type = sonic_song.suffix + self.logger.debug( + "Fetching stream details for id %s '%s' with format '%s'", + sonic_song.id, + sonic_song.title, + mime_type, + ) + return StreamDetails( item_id=sonic_song.id, provider=self.instance_id, @@ -815,6 +822,8 @@ class OpenSonicProvider(MusicProvider): """Provide a generator for the stream data.""" audio_buffer = asyncio.Queue(1) + self.logger.debug("Streaming %s", streamdetails.item_id) + def _streamer() -> None: with self._conn.stream( streamdetails.item_id, timeOffset=seek_position, estimateContentLength=True @@ -838,3 +847,5 @@ class OpenSonicProvider(MusicProvider): finally: if not streamer_task.done(): streamer_task.cancel() + + self.logger.debug("Done streaming %s", streamdetails.item_id)