名称: sabnzbd
版本: 1.0.0
描述: 通过 SABnzbd 管理 Usenet 下载。当用户提及“检查 SABnzbd”、“列出 NZB 队列”、“添加 NZB”、“暂停下载”、“恢复下载”、“SABnzbd 状态”、“Usenet 队列”、“NZB 历史”或 SABnzbd/sab 下载管理时使用。
通过 SABnzbd 的 REST API 管理 Usenet 下载。
配置文件路径:~/.clawdbot/credentials/sabnzbd/config.json
{
"url": "http://localhost:8080",
"apiKey": "your-api-key-from-config-general"
}
API 密钥可在 SABnzbd 的 配置 → 常规 → 安全 中获取。
# 完整队列
./scripts/sab-api.sh queue
# 使用过滤器
./scripts/sab-api.sh queue --limit 10 --category tv
# 指定任务
./scripts/sab-api.sh queue --nzo-id SABnzbd_nzo_xxxxx
# 通过 URL(索引器链接)
./scripts/sab-api.sh add "https://indexer.com/get.php?guid=..."
# 附带选项
./scripts/sab-api.sh add "URL" --name "我的下载" --category movies --priority high
# 通过本地文件
./scripts/sab-api.sh add-file /path/to/file.nzb --category tv
优先级选项:force、high、normal、low、paused、duplicate
./scripts/sab-api.sh pause # 暂停全部
./scripts/sab-api.sh resume # 恢复全部
./scripts/sab-api.sh pause-job <nzo_id>
./scripts/sab-api.sh resume-job <nzo_id>
./scripts/sab-api.sh delete <nzo_id> # 保留文件
./scripts/sab-api.sh delete <nzo_id> --files # 同时删除文件
./scripts/sab-api.sh purge # 清空队列
./scripts/sab-api.sh speedlimit 50 # 最大速度的 50%
./scripts/sab-api.sh speedlimit 5M # 5 MB/s
./scripts/sab-api.sh speedlimit 0 # 无限制
./scripts/sab-api.sh history
./scripts/sab-api.sh history --limit 20 --failed
./scripts/sab-api.sh retry <nzo_id> # 重试失败任务
./scripts/sab-api.sh retry-all # 重试所有失败任务
./scripts/sab-api.sh delete-history <nzo_id>
./scripts/sab-api.sh categories
./scripts/sab-api.sh scripts
./scripts/sab-api.sh change-category <nzo_id> movies
./scripts/sab-api.sh change-script <nzo_id> notify.py
./scripts/sab-api.sh status # 完整状态
./scripts/sab-api.sh version
./scripts/sab-api.sh warnings
./scripts/sab-api.sh server-stats # 下载统计
队列条目包含以下字段:
- nzo_id、filename、status
- mb、mbleft、percentage
- timeleft、priority、cat
- script、labels
状态值:Downloading(下载中)、Queued(排队中)、Paused(已暂停)、Propagating(传播中)、Fetching(获取中)
历史状态:Completed(已完成)、Failed(已失败)、Queued(排队中)、Verifying(验证中)、Repairing(修复中)、Extracting(解压中)