log ffmpeg arguments
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 11 Apr 2024 20:59:44 +0000 (22:59 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 11 Apr 2024 20:59:44 +0000 (22:59 +0200)
music_assistant/server/helpers/audio.py

index 0b7f7e6bbf4bb9854b6ef7b357d00e72ab5e4cc7..6ea68932bf08793257898f1ce81e95adc4a4745e 100644 (file)
@@ -103,6 +103,16 @@ class FFMpeg(AsyncProcess):
             stderr=True,
         )
         self.logger = logger or LOGGER.getChild("ffmpeg")
+        clean_args = []
+        for arg in ffmpeg_args[1:]:
+            if arg.startswith("http"):
+                clean_args.append("<URL>")
+            elif "/" in arg and "." in arg:
+                clean_args.append("<FILE>")
+            else:
+                clean_args.append(arg)
+        args_str = " ".join(clean_args)
+        self.logger.debug("starting ffmpeg with args: %s", args_str)
 
     async def start(self) -> None:
         """Perform Async init of process."""