1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Let's see if I can capture errors

This commit is contained in:
Steffo 2020-04-29 01:28:24 +02:00
parent c7f4aa7c38
commit 53aa6c16b1
3 changed files with 7 additions and 4 deletions

View file

@ -5,7 +5,7 @@
[tool.poetry] [tool.poetry]
name = "royalnet" name = "royalnet"
version = "5.7.6" version = "5.7.7"
description = "A multipurpose bot and web framework" description = "A multipurpose bot and web framework"
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"] authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
license = "AGPL-3.0+" license = "AGPL-3.0+"

View file

@ -43,12 +43,15 @@ class YtdlDiscord:
destination_filename = re.sub(r"\.[^.]+$", ".pcm", self.ytdl_file.filename) destination_filename = re.sub(r"\.[^.]+$", ".pcm", self.ytdl_file.filename)
async with self.lock.exclusive(): async with self.lock.exclusive():
log.debug(f"Converting to PCM: {self.ytdl_file.filename}") log.debug(f"Converting to PCM: {self.ytdl_file.filename}")
await asyncify( out, err = await asyncify(
ffmpeg.input(self.ytdl_file.filename) ffmpeg.input(self.ytdl_file.filename)
.output(destination_filename, format="s16le", ac=2, ar="48000") .output(destination_filename, format="s16le", ac=2, ar="48000")
.overwrite_output() .overwrite_output()
.run .run,
capture_stdout=True,
capture_stderr=True,
) )
log.debug(f"ffmpeg returned: ({type(out)}, {type(err)})")
self.pcm_filename = destination_filename self.pcm_filename = destination_filename
async def delete_asap(self) -> None: async def delete_asap(self) -> None:

View file

@ -1 +1 @@
semantic = "5.7.6" semantic = "5.7.7"