Torrent transfer
Torrent transfer (转移做种), under Download (下载), moves finished torrents from one downloader to another and keeps seeding them there. The data files stay where they are. For example, hand long-seeding torrents from qBittorrent on an SSD to Transmission on a NAS.
Transferring
Tick torrents in the Downloader web UI (下载器 Web UI), from one or more downloaders, or tick records already pushed to a downloader in the Task list (任务列表). Click Transfer to… (转移到…), pick the target downloader and click Preview (预览). For each torrent the preview shows:
- Whether it can be transferred. Otherwise the reason: not finished, already in the target downloader, already being transferred, shares its data with another torrent in this downloader, a reseed job in progress in this downloader needs its data, no torrent file available, and so on. Torrents that share data (a reseeded torrent and its original, for example) are not transferred, even when both are selected: once one of them moves, two downloaders use the same files, and deleting one of them with its data breaks the other. For torrents in the same folder pt-tools reads the file lists to tell whether they share data; when a list cannot be read, the preview says it could not tell, and the torrent is not transferred this time. Try again later.
- The source path and the path in the target downloader (see Path mappings).
- Where the torrent file comes from: qBittorrent 4.5 and later export it directly; for older qBittorrent and for Transmission, pt-tools downloads it again from the site using its push record and checks the info hash. A torrent without a push record can only leave qBittorrent 4.5 or later.
After Create N transfer jobs (建 N 个转移任务), the jobs run in the background, one at a time:
- Get the torrent file.
- Add the torrent to the target downloader paused, with the mapped save path (in qBittorrent it is placed at that path with Automatic Torrent Management off; qBittorrent 4.5 and earlier ignore the save path when Default Torrent Management Mode is Automatic) and two tags on top of its category and tags:
pt-tools-transferandpt-tools-transfer-<job number>, which belongs to this job only. This goes through the same entry point as pushing a torrent: the site seeding capacity limit still applies; the data is already on disk, so no disk space is reserved. - Let the target downloader check the data.
- Once the check reaches 100%, start seeding in the target downloader, then remove the torrent from the source downloader, keeping the data files. Right before it starts seeding, pt-tools confirms the target is still at 100% and looks at the source downloader again: if a torrent sharing its data appeared after the job was created (cross-seeded by another tool or added by hand), the transfer stops, the torrent is removed from the target with its data kept, the source is left alone, and the job is marked Rolled back (已回滚); the same happens when the target copy has already started (started by hand, or started in an earlier run whose removal from the source failed); if the source downloader cannot be read, it waits for the next run. If the source torrent is already gone, the job finishes without rolling back (a rollback would leave the torrent in neither downloader); cross-seeding jobs in the source downloader that still need its data are withdrawn first: one not added yet is canceled, and one already added (still paused) is removed from the source downloader with its data kept and marked withdrawn (已撤回), each with the reason; their cross-seeding records move to the target downloader, so retrying them on the cross-seeding Records tab looks for the original where it is now. pt-tools' own cross-seeding and transfers never use the same torrent at once: a transfer job is not created while a queued cross-seeding job needs the torrent's data, and a cross-seeding job is skipped while its original is being transferred. The pt-tools records of the torrent on the source downloader move to the target downloader, and so do finished cross-seeding records that use it as the original (withdrawn, canceled, failed and so on), so retrying them on the Records tab still finds the original.
If the check stops short of 100% (the data is not at the target path, usually a wrong path mapping; or the target qBittorrent's Torrent content layout (Torrent 内容布局) setting differs from the one the source torrent was added with, since a torrent transferred from qBittorrent is placed by the target's setting (one transferred from Transmission is placed as Original). A source torrent whose content path has an extra folder named after its file was added with Create subfolder (创建子文件夹); a multi-file torrent whose files sit directly in the save path was added with Don't create subfolder (不创建子文件夹) (for a torrent with one file in its folder, the content path is that file under the save path: a torrent whose name has no extension but whose content path is a single file is this kind too, and setting the target to Don't create subfolder also leaves single-file torrents placed as they are); anything else is Original (原始). Set the target's setting to match the source torrent and transfer again; this is a global setting of the target qBittorrent, so change it back after the transfer; a Transmission target only takes torrents laid out as Original) or runs out of time (30 minutes plus the time to read all the data at 20 MiB/s), the torrent is removed from the target downloader with its data kept, the torrent in the source downloader is left alone, and the job is marked Rolled back (已回滚).
Each target downloader checks one transferred torrent at a time and the rest wait, so that many checks at once do not saturate the disk. After pt-tools restarts, each job continues from the step where it stopped.
The pt-tools-transfer-<job number> tag marks the torrent this job added: when the target downloader holds the same torrent without that tag (for example one you added yourself, even with pt-tools-transfer), the job fails and neither copy is touched. When the job ends, qBittorrent deletes this tag (so it does not stay in the tag list) and pt-tools-transfer stays; in Transmission the label stays on the torrent.
Jobs
Torrent transfer → Jobs (任务) lists the latest 200 jobs with their state, check progress and messages. Jobs not yet added to the target downloader can be canceled; Clear finished (清除已结束) only deletes job records and leaves the downloaders alone.
| State | Meaning |
|---|---|
| Waiting to export (等待导出) | Just created, no torrent file yet |
| Waiting to add (等待加入) | Torrent file ready, waiting for the target downloader |
| Adding (正在加入) | Being added to the target downloader paused |
| Checking (校验中) | Added paused, the target is checking the data |
| Checked (校验完成) | Next: start seeding in the target and remove from the source |
| Done (已完成) | Seeding in the target, removed from the source |
| Rolled back (已回滚) | Check below 100%, timed out, or shared data found before finishing; removed from the target, source left alone |
| Failed (失败) | Failed before the torrent was added, for example the site capacity is full |
| Canceled (已取消) | Canceled before the torrent was added |
Path mappings
When two downloaders see the same data under different paths (for example two containers mount one disk at different folders), open Path mappings (路径映射), pick the source and target downloaders, add one line per folder, "path prefix in the source downloader → path prefix in the target downloader", and click Save (保存).
- The longest matching prefix wins, compared by whole folders:
/datadoes not match/database. - Windows paths (a drive letter or
\\at the start) match regardless of case and with either/or\; Linux paths are case-sensitive. - When one side is a Windows path and the other a Linux path, the separators in the rest of the path follow the target.
- Without a match, the target uses the same path.
Scheduled rules
Scheduled rules (定时规则) create transfer jobs for matching torrents in the source downloader at an interval. They are off by default. With no conditions, every finished torrent matches:
- category equals, tags contain (case-insensitive);
- site: the site in the pt-tools push record, or the site recognised from the tracker when there is no record, as a site ID such as
hdsky; - seeding time of at least so many hours.
Each run takes the oldest torrents first and creates at most Max per run (每轮最多) jobs (10 by default, up to 100); the interval is 60 minutes by default and at least 10. Torrents already in the target downloader, torrents with a job in progress and brush torrents (tagged pt-tools-brush) are skipped. Torrents that share data with another torrent are skipped too; they do not count against Max per run, and Last run (上次运行) shows how many there were. Run now (立即运行) runs the rule once; the outcome shows under Last run (上次运行).
API
| Method and path | Purpose |
|---|---|
POST /api/transfer/preview | Preview {target_id, items: [{source_id, hash}]} |
GET /api/transfer/jobs?status=active|finished | Jobs (latest 200) |
POST /api/transfer/jobs | Create jobs; same body as the preview; returns {created, skipped} |
POST /api/transfer/jobs/{id}/cancel | Cancel a job not yet added to the target |
DELETE /api/transfer/jobs | Clear finished job records |
GET, PUT /api/transfer/path-maps | Read or replace the path mappings of a pair of downloaders |
GET, POST /api/transfer/rules; GET, PUT, DELETE /api/transfer/rules/{id}; POST …/{id}/run | Scheduled rules and running one now |
All of them require a signed-in session. A preview or a create request takes at most 500 torrents.