ClawSkills logoClawSkills

Qbittorrent

使用 qBittorrent 管理 Torrent。当用户要求“列出种子”、“添加种子”、“暂停种子”、“恢复种子”、“删除种子”、“检查下载...

介绍

# qBittorrent WebUI API

通过 qBittorrent 的 WebUI API (v4.1+) 管理 Torrent。

## 设置

配置:`~/.clawdbot/credentials/qbittorrent/config.json`

```json { "url": "http://localhost:8080", "username": "admin", "password": "adminadmin" } ```

## 快速参考

### 列出 Torrent

```bash # All torrents ./scripts/qbit-api.sh list

# Filter by status ./scripts/qbit-api.sh list --filter downloading ./scripts/qbit-api.sh list --filter seeding ./scripts/qbit-api.sh list --filter paused

# Filter by category ./scripts/qbit-api.sh list --category movies ```

筛选器:`all`(全部),`downloading`(下载中),`seeding`(做种中),`completed`(已完成),`paused`(已暂停),`active`(活动中),`inactive`(非活动),`stalled`(停滞),`errored`(错误)

### 获取 Torrent 信息

```bash ./scripts/qbit-api.sh info <hash> ./scripts/qbit-api.sh files <hash> ./scripts/qbit-api.sh trackers <hash> ```

### 添加 Torrent

```bash # By magnet or URL ./scripts/qbit-api.sh add "magnet:?xt=..." --category movies

# By file ./scripts/qbit-api.sh add-file /path/to/file.torrent --paused ```

### 控制 Torrent

```bash ./scripts/qbit-api.sh pause <hash> # or "all" ./scripts/qbit-api.sh resume <hash> # or "all" ./scripts/qbit-api.sh delete <hash> # keep files ./scripts/qbit-api.sh delete <hash> --files # delete files too ./scripts/qbit-api.sh recheck <hash> ```

### 分类与标签

```bash ./scripts/qbit-api.sh categories ./scripts/qbit-api.sh tags ./scripts/qbit-api.sh set-category <hash> movies ./scripts/qbit-api.sh add-tags <hash> "important,archive" ```

### 传输信息

```bash ./scripts/qbit-api.sh transfer # global speed/stats ./scripts/qbit-api.sh speedlimit # current limits ./scripts/qbit-api.sh set-speedlimit --down 5M --up 1M ```

### 应用信息

```bash ./scripts/qbit-api.sh version ./scripts/qbit-api.sh preferences ```

## 响应格式

Torrent 对象包括: - `hash`(哈希),`name`(名称),`state`(状态),`progress`(进度) - `dlspeed`(下载速度),`upspeed`(上传速度),`eta`(剩余时间) - `size`(大小),`downloaded`(已下载),`uploaded`(已上传) - `category`(分类),`tags`(标签),`save_path`(保存路径)

状态:`downloading`(下载中),`stalledDL`(下载停滞),`uploading`(上传中),`stalledUP`(上传停滞),`pausedDL`(下载暂停),`pausedUP`(上传暂停),`queuedDL`(下载队列),`queuedUP`(上传队列),`checkingDL`(下载校验中),`checkingUP`(上传校验中),`error`(错误),`missingFiles`(文件丢失)

更多产品