mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 10:03:40 +01:00
Fix yt-dlp
This commit is contained in:
parent
5436e72e72
commit
2b7804b22a
3 changed files with 18 additions and 4 deletions
|
@ -750,7 +750,7 @@ class OtherCog(commands.Cog):
|
|||
options = [
|
||||
"--no-colors",
|
||||
"--no-playlist",
|
||||
"--max-filesize", str(MAX_SIZE) + "M",
|
||||
# "--max-filesize", str(MAX_SIZE) + "M",
|
||||
"--no-warnings",
|
||||
"--output", OUTPUT_FILE,
|
||||
]
|
||||
|
@ -795,9 +795,14 @@ class OtherCog(commands.Cog):
|
|||
stderr_log_file
|
||||
] if upload_log else []
|
||||
for file_name in Path(tempdir).glob(f"{ctx.user.id}.*"):
|
||||
stat = file_name.stat()
|
||||
size_mb = stat.st_size / 1024 ** 2
|
||||
if size_mb > MAX_SIZE - 0.1:
|
||||
_x = io.BytesIO(f"File {file_name.name} was too large ({size_mb:,.1f}MB vs {MAX_SIZE:.1f}MB)".encode())
|
||||
files.append(discord.File(_x, filename=file_name.name + ".txt"))
|
||||
try:
|
||||
async with aiofiles.open(file_name) as file:
|
||||
video = discord.File(await file.read(), filename=file_name.name)
|
||||
with open(file_name) as file:
|
||||
video = discord.File(file, filename=file_name.name)
|
||||
files.append(video)
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
|
|
|
@ -28014,3 +28014,12 @@ kekma.net
|
|||
dogehls.xyz
|
||||
nhentai.com
|
||||
fast.com
|
||||
cup.shronkservz.tk
|
||||
.+.archive.org
|
||||
(.+\.)*reddit.com
|
||||
.+\.shronkservz.tk
|
||||
.+.github.io
|
||||
.+.ca
|
||||
cakefarts.org
|
||||
newscatinbrazil.com
|
||||
tubgirl.ca
|
||||
|
|
|
@ -18,7 +18,7 @@ GENERAL = "https://ptb.discord.com/channels/994710566612500550/10189153423172772
|
|||
|
||||
OAUTH_ENABLED = OAUTH_ID and OAUTH_SECRET and OAUTH_REDIRECT_URI
|
||||
|
||||
app = FastAPI()
|
||||
app = FastAPI(root_path="/jimmy")
|
||||
app.state.bot = None
|
||||
app.state.states = set()
|
||||
app.state.http = httpx.Client()
|
||||
|
|
Loading…
Reference in a new issue