mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Always compress where possible
This commit is contained in:
parent
03743e2f65
commit
d7d6462d6d
1 changed files with 39 additions and 39 deletions
|
@ -1265,8 +1265,7 @@ class OtherCog(commands.Cog):
|
|||
continue
|
||||
st = file.stat().st_size
|
||||
COMPRESS_FAILED = False
|
||||
if st / 1024 / 1024 >= MAX_SIZE_MB or st >= BYTES_REMAINING:
|
||||
if compress_if_possible:
|
||||
if compress_if_possible and file.suffix in (".mp4", ".mkv", ".mov"):
|
||||
await ctx.edit(
|
||||
embed=discord.Embed(
|
||||
title="Compressing...",
|
||||
|
@ -1306,6 +1305,7 @@ class OtherCog(commands.Cog):
|
|||
files.append(discord.File(file, file.name))
|
||||
BYTES_REMAINING -= st
|
||||
continue
|
||||
if st / 1024 / 1024 >= MAX_SIZE_MB or st >= BYTES_REMAINING:
|
||||
units = ["B", "KB", "MB", "GB", "TB"]
|
||||
st_r = st
|
||||
while st_r > 1024:
|
||||
|
|
Loading…
Reference in a new issue