fix(download): 下载器离线与下载目录读不到容量开待处理,季包暂停添加后选文件

- M5:单个下载器连续 10 分钟连不上开 downloader_offline(按实例去重),恢复连接后自动关闭
- M3:下载目录读不到容量按卷开 critical 的 cache_volume_unknown,读到后关闭;面板单独显示
  「下载目录读不到」不再归为等空间;cache.threshold 不再把未知当 0%
- M4:季包 / 多集包 .torrent 暂停添加、磁力用「拿到元数据后停止」,选完文件再恢复;文件清单
  拿不到时留给同步重试,超过 10 分钟整包下载并记 file_list_timeout
- L1:提交 commit 时锁计划复核仍是 reserved,被取消的不写回 submitted,qB 里刚加的任务暂停、
  去掉管理标签并打 <管理标签>-cancelled
- L3:已收单未确认的提交在同步首次看到任务时补调 afterDownloadAccepted
- L4:排队中(queuedDL)的纳管任务一并受阈值暂停
- L6:停用的下载器上还有在下的任务时仍同步这些任务(不接管新任务、不开离线事项)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-03 23:20:29 +08:00
1 parent 07d5f42143
commit 19f7bd0330
8 files changed
+924 -60

No files matched your search

@@ -120,6 +120,11 @@ export interface AddTorrentRequest {
category?: string;
tags?: string[];
paused?: boolean;
/**
* qB ≥ 4.5 的停止条件:MetadataReceived = 磁力拿到元数据后自动暂停(暂停添加的磁力不会去取元数据);
* 旧版本忽略该参数、照常开始下载
*/
stopCondition?: "MetadataReceived" | "FilesChecked";
rename?: string;
contentLayout?: "Original" | "Subfolder" | "NoSubfolder";
sequential?: boolean;
@@ -516,6 +521,7 @@ export class QbClient implements DownloaderClient {
const paused = req.paused ? "true" : "false";
form.append("paused", paused); // <= 4.x
form.append("stopped", paused); // >= 5.x
if (req.stopCondition) form.append("stopCondition", req.stopCondition);
if (req.rename) form.append("rename", req.rename);
form.append("contentLayout", req.contentLayout ?? "Original");
form.append("autoTMM", "false");