GithubHelp home page GithubHelp logo

ylxb2016 / qb2ut Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nuevo009/qb2ut

0.0 0.0 0.0 20 KB

A tool to migrate torrents from qbittorrent to utorrent.

License: GNU General Public License v3.0

JavaScript 78.47% Python 21.53%

qb2ut's Introduction

qb2ut

A tool to migrate torrents from qbittorrent to utorrent.

About

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.

Usage

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.

  1. Clone this repository or download a zip file, then open your terminal and run yarn to install node modules, and then run pip install qbittorrent-api.

  2. Create a config.json from config.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 your C:\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 run python ./export.py.

  3. 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 run node index > 1.log and check the log file. Or if you don't care about log, you can run node index >nul, this would only report errors in your terminal.

  4. The resume.dat and matched torrents are saved in output. Copy these files to the utorrent's root directory. Then open your utorrent and check.

Configuration

  • 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

Known issues

  • 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.

Reference

https://github.com/zhyupe/utorrent-resume https://gist.github.com/shirohako/d0bd55d5b6f4408e2ea08a63dd52cb86#file-qb-py

License

This project is published under GPL-3.0

qb2ut's People

Contributors

nuevo009 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.