A tool to migrate torrents from qbittorrent to utorrent.
This tool is only tested on windows 11, qbittorrent 4.2.5, utorrent 2.2.1, node.js 17.0.1, python 3.9.7, yarn 1.22.15.
Different from other similar tools, it use python with qbittorrentapi to export the qbittorrent torrents based on qbittorrent webui api. So you can make some custom rules to export. like
-
export only public trackers and name include "vcb-s" or torrents in category 'rxxx':
torrent.name.lower().find('vcb-s') != -1 and qbt_client.torrents_trackers(torrent.hash)[0].msg != '这是私有 torrent' or torrent.category == 'rxxx'
-
You may find more useful examples here.
And about utorrent, sadly its webui api is very poor, which is unable to meet this demand. So I use a tool based on nodejs, and add some features.
In fact, if you have torrent files and downloaded files, this tool can help you migrate from any bittorrent client to utorrent, because it does not depend on the resume file of other clients.
To use this tool, you must have Node.js, yarn and Python3 installed.
You can easily get them from Scoop package manager. Just run scoop install python nodejs yarn
. I do not test it with npm.
Before you use this tool, be sure that there is no torrent added in your utorrent. This tool will replace the resume.dat
.
-
Clone this repository or download a zip file, then open your terminal and run
yarn
to install node modules, and then runpip install qbittorrent-api
. -
Create a
config.json
fromconfig.json.sample
.-
If you do not have many seeding directories, you can just write them in your config. And copy all torrents from your
BT_backup
which is usually in yourC:\Users\username\AppData\Local\qBittorrent
to some place like./torrents
and add it to config. In this case you do not need to install Python and qbittorrent-api. -
If you need Python to help you export torrents and write config.json, you need to configure your qbittorrent-webui and configure in
export.py
, and runpython ./export.py
.
-
-
Run
node index
, log and errors would be reported. Or if you have thousands of torrents and don't want to read the log from terminal, you can runnode index > 1.log
and check the log file. Or if you don't care about log, you can runnode index >nul
, this would only report errors in your terminal. -
The
resume.dat
and matched torrents are saved inoutput
. Copy these files to the utorrent's root directory. Then open your utorrent and check.
torrentDir
: torrent files directory.dataDir
: seeding directories.blacklist
: ignore irrelevant files.Any file or directory whose name equal to any item in the array will be ignored.depth
: searching directory path depth
You can find other configuration guide in export.py
- If you customized the name of the highest folder of a torrent, the tool would not find it.
- If you have incomplete downloaded file, the torrent will still be migrated and you have to check the content.
To fix these, I need to read the fastresume file of qbittorrent, and write it to a pure python tool. But now it works fine for me. Maybe someday I will do that.
https://github.com/zhyupe/utorrent-resume https://gist.github.com/shirohako/d0bd55d5b6f4408e2ea08a63dd52cb86#file-qb-py
This project is published under GPL-3.0