Page 1 of 11

Migrate from uTorrent to qBittorrent easily

Posted: Sat Mar 07, 2015 3:35 pm
by Danzig
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:
  1. Close both uTorrent and qBittorent
  2. Open a command prompt from Start menu
  3. 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\)
  4. 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.

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sat Mar 07, 2015 5:41 pm
by Nemo
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.

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sat Mar 07, 2015 10:27 pm
by TRiT0NE
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.

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sat Mar 07, 2015 11:19 pm
by Protac
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"

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 12:14 am
by Nemo
Thanks for confirming Protac, and welcome by the way :).

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 6:29 am
by Douman
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 9:36 am
by Danzig
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.

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 10:25 am
by sledgehammer_999
[quote="Douman"]
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)
[/quote]

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)

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 11:18 am
by Danzig
[quote="sledgehammer_999"]
[quote="Douman"]
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)
[/quote]

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)
[/quote]

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

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 11:30 am
by sledgehammer_999
[quote="Danzig"]
[quote="sledgehammer_999"]
[quote="Douman"]
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)
[/quote]

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)
[/quote]

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

Likewise.

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 12:53 pm
by dcx123
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

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 1:04 pm
by Danzig
[quote="dcx123"]
c:\>ut2gt.exe "C:\Users\Bob\AppData\Roaming\uTorrent" "C:\Users\Bob\AppData\Lo
cal\qBittorrent\BT_backup"
[/quote]

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)!  :)

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 1:24 pm
by Douman
[quote="sledgehammer_999"]
[quote="Douman"]
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)
[/quote]

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)
[/quote]

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

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 1:36 pm
by Danzig
[quote="Douman"]
[quote="sledgehammer_999"]
[quote="Douman"]
Maybe you could describe your algorithm in details?
I would like to re-write it in python :)
[/quote]

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)
[/quote]

Thanks, i will try to port this ruby script to python :)
[/quote]

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.

 

Re: Migrate from uTorrent to qBittorrent easily

Posted: Sun Mar 08, 2015 3:06 pm
by dcx123
[quote="Danzig"]
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)!  :)
[/quote]

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