From 53aa6c16b19acbf6155eaacc3b1ab8aa62531036 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 29 Apr 2020 01:28:24 +0200 Subject: [PATCH] Let's see if I can capture errors --- pyproject.toml | 2 +- royalnet/bard/discord/ytdldiscord.py | 7 +++++-- royalnet/version.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5df2e59c..25eb4554 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ [tool.poetry] name = "royalnet" - version = "5.7.6" + version = "5.7.7" description = "A multipurpose bot and web framework" authors = ["Stefano Pigozzi "] license = "AGPL-3.0+" diff --git a/royalnet/bard/discord/ytdldiscord.py b/royalnet/bard/discord/ytdldiscord.py index 02263483..d49ec6f5 100644 --- a/royalnet/bard/discord/ytdldiscord.py +++ b/royalnet/bard/discord/ytdldiscord.py @@ -43,12 +43,15 @@ class YtdlDiscord: destination_filename = re.sub(r"\.[^.]+$", ".pcm", self.ytdl_file.filename) async with self.lock.exclusive(): log.debug(f"Converting to PCM: {self.ytdl_file.filename}") - await asyncify( + out, err = await asyncify( ffmpeg.input(self.ytdl_file.filename) .output(destination_filename, format="s16le", ac=2, ar="48000") .overwrite_output() - .run + .run, + capture_stdout=True, + capture_stderr=True, ) + log.debug(f"ffmpeg returned: ({type(out)}, {type(err)})") self.pcm_filename = destination_filename async def delete_asap(self) -> None: diff --git a/royalnet/version.py b/royalnet/version.py index 847122ef..9728ff9b 100644 --- a/royalnet/version.py +++ b/royalnet/version.py @@ -1 +1 @@ -semantic = "5.7.6" +semantic = "5.7.7"