Fix ffprobe

This commit is contained in:
Nexus 2024-04-15 22:38:29 +01:00
parent 024f32a1e9
commit e00a6c19fe
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -49,7 +49,7 @@ class FFMeta(commands.Cog):
stdout, stderr = await process.communicate() stdout, stderr = await process.communicate()
if as_json: if as_json:
return json.loads(stdout.decode()) return json.loads(stdout.decode())
return stdout.decode(errors="replace") return stderr.decode(errors="replace")
@commands.slash_command() @commands.slash_command()
async def ffprobe(self, ctx: discord.ApplicationContext, url: str = None, attachment: discord.Attachment = None): async def ffprobe(self, ctx: discord.ApplicationContext, url: str = None, attachment: discord.Attachment = None):