-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Feature Request: Implement a streaming mode for qbleech to minimize disk usage
Is your feature request related to a problem? Please describe.
When using the qbleech
command to download and send files to Telegram, the bot currently downloads all files before uploading. On small VPS instances , this quickly fills up the disk.
Describe the solution you'd like
Add a "streaming mode" that processes one file at a time sequentially:
- Prioritize the first file in the torrent and begin downloading it.
- Once the file finishes downloading:
- Upload it immediately to Telegram.
- Delete the file from the VPS.
- Mark the file as "do-not-redownload" in qBittorrent so it isn’t fetched again.
- Move to the next file in sequence , increase its priority and repeat until all files have been uploaded.
This way, at most one file is present on disk at any given time, greatly reducing storage usage. Also it increases efficiency by doing parallel download and upload reducing waiting time if network is not congested
Describe alternatives you’ve considered
Implementing an auto-adjusting download process, such as:
- Pausing the download when the disk is almost full.
- Uploading already-downloaded data to Telegram.
- Unmarking uploaded files in qBittorrent so they can be cleaned up.
- Resuming the download after freeing up space.
While this could work, a sequential streaming mode would be simpler and more robust.
Additional context
This feature would help those of us running WzML/qbleech on low-storage servers or small-disk VPS instances, allowing large torrents to be leeched without worrying about disk capacity.
Key considerations:
- If uploading is faster than downloading, files are uploaded and cleaned up immediately — minimal disk usage.
- If downloading is faster than uploading, a backlog of files could accumulate.
- To prevent running out of space:
- Pause new downloads when available disk drops below a critical threshold (e.g. 2 GB).
- Upload and delete already-downloaded files.
- Mark uploaded files as completed in qBittorrent so they aren’t redownloaded.
- Resume downloading once enough space is freed.