From 2b6cc4aa7c502a8dc18de95b1175a9d9c3f73524 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sun, 2 Apr 2023 00:43:55 +0200 Subject: [PATCH] change log levels --- music_assistant/server/controllers/streams.py | 2 +- music_assistant/server/helpers/audio.py | 2 +- music_assistant/server/helpers/process.py | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/music_assistant/server/controllers/streams.py b/music_assistant/server/controllers/streams.py index bd6ca599..a0f7240c 100644 --- a/music_assistant/server/controllers/streams.py +++ b/music_assistant/server/controllers/streams.py @@ -629,7 +629,7 @@ class StreamsController: "ffmpeg", "-hide_banner", "-loglevel", - "verbose" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet", + "warning" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet", "-ignore_unknown", ] # input args diff --git a/music_assistant/server/helpers/audio.py b/music_assistant/server/helpers/audio.py index 64186edc..89384b3c 100644 --- a/music_assistant/server/helpers/audio.py +++ b/music_assistant/server/helpers/audio.py @@ -747,7 +747,7 @@ async def _get_ffmpeg_args( "ffmpeg", "-hide_banner", "-loglevel", - "verbose" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet", + "warning" if LOGGER.isEnabledFor(logging.DEBUG) else "quiet", "-ignore_unknown", ] # collect input args diff --git a/music_assistant/server/helpers/process.py b/music_assistant/server/helpers/process.py index fafa6239..c928416b 100644 --- a/music_assistant/server/helpers/process.py +++ b/music_assistant/server/helpers/process.py @@ -114,10 +114,7 @@ class AsyncProcess: if self.closed or self._proc.stdin.is_closing(): return self._proc.stdin.write(data) - try: - await self._proc.stdin.drain() - except BrokenPipeError: - LOGGER.warning("Attempted write to an already closed process") + await self._proc.stdin.drain() def write_eof(self) -> None: """Write end of file to to process stdin.""" @@ -134,7 +131,7 @@ class AsyncProcess: ConnectionResetError, ): # already exited, race condition - LOGGER.warning("Attempted write to an already closed process") + pass async def communicate(self, input_data: bytes | None = None) -> tuple[bytes, bytes]: """Write bytes to process and read back results.""" -- 2.34.1