From 1bf5a03c2d835b192a3afe482f40a333def9d5e8 Mon Sep 17 00:00:00 2001 From: hldh214 Date: Thu, 15 Aug 2024 09:23:28 +0900 Subject: [PATCH] Increase maximum upload video file size limit to 4GiB Updated the `get_upload_videos` function to support video files up to 4GiB from the previous limit of 2000MiB. Adjusted the corresponding warning message to reflect the new file size threshold. Signed-off-by: hldh214 --- recorder/uploader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recorder/uploader.py b/recorder/uploader.py index 26cfc59..0465a9d 100644 --- a/recorder/uploader.py +++ b/recorder/uploader.py @@ -76,7 +76,7 @@ def init_spankbang(): def get_upload_videos( source_type, filesize_min=1024 * 1024 * 64, - filesize_max=1024 * 1024 * 2000, + filesize_max=1024 * 1024 * 1024 * 4, should_delete_small_files=True ): video_path = pathlib.Path( @@ -102,7 +102,7 @@ def get_upload_videos( delete_files.append(file) continue if filesize > filesize_max: - logger.warning(f'{file}: {sizeof_fmt(filesize)} > 2000MiB, skip') + logger.warning(f'{file}: {sizeof_fmt(filesize)} > 4GiB, skip') continue path = pathlib.Path(file)