AgentSkillsCN

qbittorrent

通过 qBittorrent 管理种子文件。支持通过 WebUI API 进行添加、暂停、恢复、删除、调整文件优先级等操作。

SKILL.md
--- frontmatter
name: qbittorrent
version: 1.1.0
description: Manage torrents with qBittorrent. Supports add, pause, resume, delete, file priority, and more via WebUI API.

qBittorrent WebUI API

Manage torrents via qBittorrent's WebUI API (v5.0+).

Setup

Config: ~/.openclaw/credentials/qbittorrent/config.json

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

Quick Reference

List Torrents

bash
./scripts/qbit-api.sh list [--filter downloading]
./scripts/qbit-api.sh list --category movies

Torrent Info

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

Add Torrent

bash
./scripts/qbit-api.sh add "magnet:?xt=..." --category movies
./scripts/qbit-api.sh add "URL" --paused

File Priority

bash
# Set single file priority
./scripts/qbit-api.sh set-file-priority <hash> <file_id> <priority>

Control

bash
./scripts/qbit-api.sh pause <hash|all>
./scripts/qbit-api.sh resume <hash>
./scripts/qbit-api.sh delete <hash>
./scripts/qbit-api.sh add-tags <hash> "tag1,tag2"

File Priority API

Set single file priority:

bash
./scripts/qbit-api.sh set-file-priority <hash> <file_id> <priority>

Priority Values:

ValueMeaningAction
0SkipDo not download
1NormalDownload normally
6HighDownload first

File ID: Index from files <hash> output (0-based)

Response Format

Torrent Info

json
{
  "hash": "...",
  "name": "...",
  "state": "downloading",
  "progress": 0.45,
  "size": 5368709120,
  "downloaded": 2415919104,
  "dlspeed": 5242880
}

Files List

json
[
  {"index": 0, "name": "video.mp4", "size": 4294967296, "priority": 1, "progress": 0.5},
  {"index": 1, "name": "sample.mp4", "size": 10485760, "priority": 0, "progress": 0}
]

All Commands

CommandDescription
listList torrents
info <hash>Get torrent properties
files <hash>Get file list
add <url>Add torrent by URL
add-file <path>Add torrent file
pause <hash|all>Pause torrent(s)
resume <hash|all>Resume torrent(s)
delete <hash>Delete torrent
recheck <hash>Recheck files
set-file-priority <hash> <id> <prio>Set file priority
set-category <hash> <cat>Set category
add-tags <hash> <tags>Add tags
remove-tags <hash> <tags>Remove tags
categoriesList categories
tagsList tags
transferTransfer info
versionApp version

Notes

  • File ID: Use the index field from files <hash> output
  • Filtering logic: Should be implemented in calling skill (e.g., nyaa-search)
  • Pause before filter: Add with --paused for cleaner filtering