mirror of
https://github.com/Viren070/MediaFusion.git
synced 2025-12-01 23:21:11 +01:00
Check file size when creating webseed torrent creator
This commit is contained in:
@@ -2863,6 +2863,10 @@
|
||||
" if not os.path.exists(local_file_path):\n",
|
||||
" raise Exception(f\"Downloaded file not found: {local_file_path}\")\n",
|
||||
"\n",
|
||||
" file_size = os.path.getsize(local_file_path) # Size in bytes\n",
|
||||
" if file_size < 10 * 1024 * 1024: # 10 MB in bytes\n",
|
||||
" raise Exception(f\"Downloaded file size is less than 10MB (size: {file_size / (1024 * 1024):.2f} MB)\")\n",
|
||||
"\n",
|
||||
" # Create torrent file\n",
|
||||
" output_path = os.path.join(self.base_path, \"torrents\", f\"{torrent_name}.torrent\")\n",
|
||||
"\n",
|
||||
|
||||
Reference in New Issue
Block a user