Why do we need random cleaning? Because randomness is simple enough—it only requires control via one parameter, delete_probability (with a value range of 0-1), which helps avoid the difficulty of making choices. Otherwise, when the disk is full, we would have to comprehensively decide which torrents to delete based on metrics like Ratio, Seeds, Peers, and Last Activity.
为什么需要随机清理?因为随机足够简单,只需要1个参数 delete_probability (0-1) 控制,避免选择困难症。否则,当磁盘满了的时候,我们需要根据分享率(Ratio)、Seeds、Peers、Last Activity来综合决定哪些需要删除。
If everyone uses similar cleaning strategies—for instance, deleting torrents where the Ratio is greater than a certain value (e.g., Ratio > xx)—then less popular torrents may end up becoming dead torrents. Random cleaning helps make torrents more equal to each other and reduces the risk of torrents becoming dead.
如果大家都按照相似的策略进行清理,例如分享率>xx,那么冷门资源就可能变成死种。随机清理能让种子之间变得更加平等,减少死种的风险。
- Install Git and the latest version of Python. (Refer to online tutorials for guidance)
- Clone this repository using Git:
git clone <repository-url> - Install the required Python packages:
pip install -r requirements.txt
The project was developed using uv. If you are a uv user, run uv sync instead of directly installing from requirements.txt. If you're unfamiliar with uv, you can ignore this section.
- 安装 Git 和最新版本的 Python。(可参考网上教程)
- 使用 Git 克隆本仓库:git clone
<仓库地址> - 安装所需的 Python 包:
pip install -r requirements.txt
本项目基于 uv 开发。如果您是 uv 用户,请运行 uv sync,而非直接从 requirements.txt 安装。如果您不了解 uv,可以忽略此部分。
English:
Chinese:
- Run
python main.py(for uv users:uv run main.py. If you're unfamiliar with uv, simply ignore this.)- 运行
python main.py(uv 用户请运行uv run main.py。如果您不了解 uv,忽略此说明即可。)
- 运行
- The python program will prompt you for the following information: webui port, directory to clean, and delete_probability. After displaying the list of torrents to be cleaned, it will ask if you want to continue. Just read the Python program's output carefully and follow the instructions to complete the cleaning process.
- 脚本会询问您以下信息:webui 端口、待清理目录、删除概率(delete_probability)。在显示待清理的种子列表后,脚本会询问是否继续。只需仔细阅读 Python 程序的输出内容并按照指示操作,即可完成清理。

