From 5a0d99744fc0f04d3765896eb43466da77c7780a Mon Sep 17 00:00:00 2001 From: Zodiac Date: Thu, 13 Feb 2025 19:29:24 -0800 Subject: [PATCH] update to 500mb limit on upload --- plugins/upload.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/upload.py b/plugins/upload.py index 5081185..e5fd66a 100644 --- a/plugins/upload.py +++ b/plugins/upload.py @@ -4,7 +4,7 @@ IRC Bot Plugin for Uploading Files to hardfiles.org This plugin allows users to upload files to hardfiles.org using yt-dlp for downloads. It supports downloading files from various sources (YouTube, Instagram, etc.) and can -optionally convert videos to MP3 format before uploading. Files larger than 100MB are rejected. +optionally convert videos to MP3 format before uploading. Files larger than 500MB are rejected. Usage: !upload [--mp3] ... @@ -114,7 +114,7 @@ class UploadPlugin: @command async def upload(self, mask, target, args): """ - Upload a file to hardfiles.org (Max 100MB). + Upload a file to hardfiles.org (Max 500MB). Args: mask (str): The user mask (nickname@host) of the command issuer. @@ -174,7 +174,7 @@ class UploadPlugin: target (str): The channel or user to send messages to. mp3 (bool): Whether to convert the downloaded file to MP3. """ - max_size = 100 * 1024 * 1024 # 100MB limit + max_size = 500 * 1024 * 1024 # 500MB limit with tempfile.TemporaryDirectory() as tmp_dir: parsed_url = urlparse(url) @@ -214,7 +214,7 @@ class UploadPlugin: self.bot.privmsg( target, ircstyle.style( - f"File size ({int(content_length) // (1024 * 1024)}MB) exceeds 100MB limit", + f"File size ({int(content_length) // (1024 * 1024)}MB) exceeds 500MB limit", fg="red", bold=True, reset=True, @@ -281,7 +281,7 @@ class UploadPlugin: self.bot.privmsg( target, ircstyle.style( - f"File size ({estimated_size // (1024 * 1024)}MB) exceeds 100MB limit", + f"File size ({estimated_size // (1024 * 1024)}MB) exceeds 500MB limit", fg="red", bold=True, reset=True, @@ -389,7 +389,7 @@ class UploadPlugin: self.bot.privmsg( target, ircstyle.style( - f"File size ({file_size // (1024 * 1024)}MB) exceeds 100MB limit", + f"File size ({file_size // (1024 * 1024)}MB) exceeds 500MB limit", fg="red", bold=True, reset=True,