Author Topic: Migrate from uTorrent to qBittorrent easily  (Read 138013 times)

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Migrate from uTorrent to qBittorrent easily
« on: March 07, 2015, 04:35:00 PM »
I just tried to fix the resume.dat importer from this thread: http://qbforums.shiki.hu/index.php/topic,2189.30.html
It worked for my 2000+ torrents. Give it a try if you need it.

Here's the code: https://gist.github.com/danzig666/5468d7dc2f7421c887e7

A compiled version can be downloaded here: 192.121.166.244/ut2qt_20150911.7z, so you don't have to install all the Ruby stuff yourself.
Previous version if the new one doesn't work: 192.121.166.244/ut2qt.7z

Update1:
New versions uploaded!

Update2:
Initial uTorrent 2.2.x support. New versions up.

Update3: 
Many bugs fixed and probably new ones introduced  ;) 

Some usage information as you asked for it:
  • Close both uTorrent and qBittorent
  • Open a command prompt from Start menu
  • Run ut2qt.exe (or the ruby script) with two command line parameters. First one is the full path and filename of uTorrents resume.dat (usually C:\Users\<username>\AppData\Roaming\uTorrent\resume.dat). The second parameter is the path to qBittorrents BT_backup folder (usually C:\Users<username>\AppData\Local\qBittorrent\BT_backup\)
  • Wait for the program to end, then start qBittorrent

There are some bugs, but it works for me. Be careful with partially downloaded torrents (where you set some files to "don't download"), because qBittorent tends to download the missing files.

And starting qBittorent with thousands of torrents imported is horribly slow, like waiting hours slow. Maybe that's normal, I first saw qBittorent yesterday.
« Last Edit: September 11, 2015, 06:21:42 PM by Danzig »

Nemo

  • qBittorrent Forum
  • Administrator
  • Forum addict
  • *****
  • Posts: 1460
  • Karma: +90/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #1 on: March 07, 2015, 06:41:02 PM »
Welcome Danzig,

This seems interesting, im making a sticky from this topic. I can't test it myself so if anyone else can use it and confirm this also that it works would be nice.

Edit: Thanks for the step by step explanation.
« Last Edit: March 07, 2015, 09:24:27 PM by Nemo »
Forum Rules and Guidelines

Forum Admin.
Dutch & Turkish Translator.




TRiT0NE

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #2 on: March 07, 2015, 11:27:29 PM »
I just tested it, but can't seem to get it to work.  It came back with tons of 'error: undefined method '[]' for nil:NilClass', 'mkfr errors', then finally:

C:/Users/ADMINI~1/AppData/Local/Temp/ocrE530.tmp/src/resumedatfinal.rb:97:in `so
rt': comparison of Array with String failed (ArgumentError)
        from C:/Users/ADMINI~1/AppData/Local/Temp/ocrE530.tmp/src/resumedatfinal
.rb:97:in `tPunchup'
        from C:/Users/ADMINI~1/AppData/Local/Temp/ocrE530.tmp/src/resumedatfinal
.rb:377:in `block in <main>'
        from C:/Users/ADMINI~1/AppData/Local/Temp/ocrE530.tmp/src/resumedatfinal
.rb:363:in `each'
        from C:/Users/ADMINI~1/AppData/Local/Temp/ocrE530.tmp/src/resumedatfinal
.rb:363:in `<main>'.

Maybe I'm doing something wrong.  :'(

edit: I also tried the script, but couldn't manage to find all the gems I needed, or did something wrong there too. I downloaded them and installed them, but still had problems. It seemed like core_ext might have been the culprit, nut not sure.
« Last Edit: March 07, 2015, 11:32:57 PM by TRiT0NE »

Protac

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #3 on: March 08, 2015, 12:19:38 AM »
Thank you Danzig, you just saved me quite a bit of work!
I just imported 100 torrents in a few seconds, and they seem to be working just fine.
Very happy that labels and ratio was imported, but the lables were missing the backslashes (I used labels to move into subfolders on completion). That doesn't matter much for me though.

All torrents were imported as active, so I immediatly paused all and resumed a few at a time without errors.

Don't know what you did different TRiT0NE, but I simply used the .exe with paths as parameters.
ut2gt.exe "C:\Users\<username>\AppData\Roaming\uTorrent\resume.dat" "C:\Users\<username>\AppData\Local\qBittorrent\BT_backup"

Nemo

  • qBittorrent Forum
  • Administrator
  • Forum addict
  • *****
  • Posts: 1460
  • Karma: +90/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #4 on: March 08, 2015, 01:14:52 AM »
Thanks for confirming Protac, and welcome by the way :).
Forum Rules and Guidelines

Forum Admin.
Dutch & Turkish Translator.




Douman

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #5 on: March 08, 2015, 07:29:08 AM »
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #6 on: March 08, 2015, 10:36:02 AM »
For those with  '[]' for nil:NilClass', 'mkfr errors': what version of uTorrent are you using? 2.2.x? Because I only tested with 3.4.x.

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2398
  • Karma: +148/-1
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #7 on: March 08, 2015, 11:25:32 AM »
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)

My first investigation into this: http://qbforums.shiki.hu/index.php/topic,1562.0.html
briantist's and my discussion on the subject and how I helped him troubleshoot some stuff: http://qbforums.shiki.hu/index.php/topic,2189.15.html
(this script is based on briantist's script)

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #8 on: March 08, 2015, 12:18:34 PM »
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)

My first investigation into this: http://qbforums.shiki.hu/index.php/topic,1562.0.html
briantist's and my discussion on the subject and how I helped him troubleshoot some stuff: http://qbforums.shiki.hu/index.php/topic,2189.15.html
(this script is based on briantist's script)

Thank for both your work!
The new version should work also with uTorrent 2.2.x resume.dat files.

sledgehammer_999

  • qBittorrent maintainer
  • Administrator
  • Forum addict
  • *****
  • Posts: 2398
  • Karma: +148/-1
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #9 on: March 08, 2015, 12:30:23 PM »
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)

My first investigation into this: http://qbforums.shiki.hu/index.php/topic,1562.0.html
briantist's and my discussion on the subject and how I helped him troubleshoot some stuff: http://qbforums.shiki.hu/index.php/topic,2189.15.html
(this script is based on briantist's script)

Thank for both your work!
The new version should work also with uTorrent 2.2.x resume.dat files.

Likewise.

dcx123

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #10 on: March 08, 2015, 01:53:24 PM »
Quote
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

c:\>ut2gt.exe "C:\Users\Bob\AppData\Roaming\uTorrent" "C:\Users\Bob\AppData\Lo
cal\qBittorrent\BT_backup"
WARNING: The rest_client gem is deprecated and will be removed from RubyGems. Pl
ease use rest-client gem instead.
Backing up dat file...C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.
0/fileutils.rb:1401:in `initialize': Is a directory @ rb_sysopen - C:\Users\Bob
\AppData\Roaming\uTorrent (Errno::EISDIR)
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:1401:in `open'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:1401:in `copy_file'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:483:in `copy_file'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:400:in `block in cp'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:1579:in `block in fu_each_src_dest'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:1595:in `fu_each_src_dest0'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:1577:in `fu_each_src_dest'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/lib/ruby/2.1.0/fileuti
ls.rb:399:in `cp'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/src/resumedatfinal.rb:
87:in `backupResumeDat'
        from C:/Users/Bob/AppData/Local/Temp/ocr18F2.tmp/src/resumedatfinal.rb:
329:in `<main>'

I'm getting the following output using the compiled version above. Any suggestions? (Win7-64bit and upgraded to uT3.4.2 as same problem when trying from uT 2.0.4)

Thanks

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #11 on: March 08, 2015, 02:04:49 PM »
c:\>ut2gt.exe "C:\Users\Bob\AppData\Roaming\uTorrent" "C:\Users\Bob\AppData\Lo
cal\qBittorrent\BT_backup"

You didn't specify the full resume.dat filename.

The first parameter should be "C:\Users\Bob\AppData\Roaming\uTorrent\resume.dat" for you. 
Please report back if it works (or not)!  :)

Douman

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #12 on: March 08, 2015, 02:24:39 PM »
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)

My first investigation into this: http://qbforums.shiki.hu/index.php/topic,1562.0.html
briantist's and my discussion on the subject and how I helped him troubleshoot some stuff: http://qbforums.shiki.hu/index.php/topic,2189.15.html
(this script is based on briantist's script)

Thanks, i will try to port this ruby script to python :)

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #13 on: March 08, 2015, 02:36:57 PM »
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)

My first investigation into this: http://qbforums.shiki.hu/index.php/topic,1562.0.html
briantist's and my discussion on the subject and how I helped him troubleshoot some stuff: http://qbforums.shiki.hu/index.php/topic,2189.15.html
(this script is based on briantist's script)

Thanks, i will try to port this ruby script to python :)

It's actually kinda simple but a bit tedious to figure out. All the needed files are bencode-ed (resume.dat, the .fastresume files and the torrent files). You just need to match the appropriate fields to each other.
 
 

dcx123

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #14 on: March 08, 2015, 04:06:15 PM »
You didn't specify the full resume.dat filename.

The first parameter should be "C:\Users\Bob\AppData\Roaming\uTorrent\resume.dat" for you. 
Please report back if it works (or not)!  :)

/facepalm  ::)

Noob!

edit: So it imported 836/841 torrents but I'd renamed/moved nearly all of them from their original download directories into new locations but none of this info was transferred across and now I must either relink 816 torrents to all of their files of go back to uT 2.0.4.
« Last Edit: March 08, 2015, 04:49:40 PM by dcx123 »