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

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #15 on: March 08, 2015, 09:04:54 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.

I've never done that. Maybe I'll look into it.
edit: I just tried this. It works form me with moved/renamed torrents 
« Last Edit: March 08, 2015, 09:25:14 PM by Danzig »

goakiller900

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #16 on: March 08, 2015, 11:54:03 PM »
so i just moved 2400 torrents and waiting to see if it works .


Works ! awesome


Can confirm the client takes ages to load. 30+ min
« Last Edit: March 09, 2015, 12:35:28 AM by goakiller900 »

Douman

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #17 on: March 09, 2015, 01:16:40 PM »
@Danzig
Can you please show example of how your script decode uT data?
i.e. q = BEncode.load_file(datpath)


For now i have GUI only  ::)

Also it would be nice if someone could send me example of resume.dat  ::)
Also i don't get what is tPunchup()  :(

Some other things in mkfr() are not easy to understand....
« Last Edit: March 09, 2015, 03:15:05 PM by Douman »

ciaobaby

  • Forum addict
  • ****
  • Posts: 2778
  • Karma: +98/-24
  • No quarter asked... No quarter given.
    • View Profile
    • WMTeu
Re: Migrate from uTorrent to qBittorrent easily
« Reply #18 on: March 09, 2015, 01:52:35 PM »
Quote
Also i don't get what is tPunchup()
Probably this, http://en.wikipedia.org/wiki/Hole_punching
Smarter than the av-er-age bear, Boo Boo.

http://qbforums.shiki.hu/index.php/topic,3084.0.html

nico910

  • Member
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #19 on: March 09, 2015, 04:17:29 PM »
Danzig thanks man, so many peoples were waiting this day :)
Can someone create a wiki page ? i don't need this personaly but i would translate in my language cause thousands of peoples need it in my country :)

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #20 on: March 09, 2015, 04:24:08 PM »
@Danzig
Can you please show example of how your script decode uT data?
i.e. q = BEncode.load_file(datpath)


For now i have GUI only  ::)

Also it would be nice if someone could send me example of resume.dat  ::)
Also i don't get what is tPunchup()  :(

Some other things in mkfr() are not easy to understand....

Here's this for python: https://pypi.python.org/pypi/bencodepy/0.9.4
The script uses the bencode ruby gem for all bencode functions, so you should just find a python bencode library and use it.


Douman

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #21 on: March 09, 2015, 04:37:32 PM »
Well for now i used Bittorrent lib for python.

Anyway i started a bit of porting:
https://github.com/DoumanAsh/collectionScripts/blob/master/python/qbt_convertor.py

For now i dont get 3 places in mkfr()
It would be great if you could explain it to me(grep for "wat?" :) )

Nemo

  • qBittorrent Forum
  • Administrator
  • Forum addict
  • *****
  • Posts: 1466
  • Karma: +90/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #22 on: March 09, 2015, 04:55:55 PM »
Thanks for your efforts and time that you put into it Danzig.
Forum Rules and Guidelines

Forum Admin.
Dutch & Turkish Translator.




Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #23 on: March 09, 2015, 05:16:48 PM »
Well for now i used Bittorrent lib for python.

Anyway i started a bit of porting:
https://github.com/DoumanAsh/collectionScripts/blob/master/python/qbt_convertor.py

For now i dont get 3 places in mkfr()
It would be great if you could explain it to me(grep for "wat?" :) )

Just look at the fields in resume.dat and the .fastresume files with https://sites.google.com/site/ultimasites/bencode-editor!

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #24 on: March 09, 2015, 05:20:48 PM »
Thanks for your efforts and time that you put into it Danzig.

Credits go to sledgehammer_999, briantist and destructoBOT. They did the majority of the work, I just fixed a few things  ;)
I'm really surprised that no one did this before.

Douman

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #25 on: March 09, 2015, 05:29:24 PM »
Well could someone share resume.dat for me?  ;)

Still, i'm unable to understand how we should form:
piece_priority
pieces

@Danzig
Why in your script these variables are equal?

According to documentation:
piece_priority - string of bytes. Each byte is interpreted as an integer and is the priority of that piece.
pieces - A string with piece flags, one character per piece. Bit 1 means we have that piece. Bit 2 means we have verified that this piece is correct. This only applies when the torrent is in seed_mode.
« Last Edit: March 09, 2015, 08:27:29 PM by Douman »

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #26 on: March 09, 2015, 10:16:12 PM »

Still, i'm unable to understand how we should form:
piece_priority
pieces

@Danzig
Why in your script these variables are equal?

According to documentation:
piece_priority - string of bytes. Each byte is interpreted as an integer and is the priority of that piece.
pieces - A string with piece flags, one character per piece. Bit 1 means we have that piece. Bit 2 means we have verified that this piece is correct. This only applies when the torrent is in seed_mode.

Yeah, pieces means that we have a piece (or not), but despite the documentation bit 2 doesn't seem to matter much to qbittorent, so I just set it to 1 when we have the piece, 0 when we don't.
piece_priority is 0 when a the piece belongs to a file not to be downloaded, and 1 (and perhaps 2,3,4+) when it has to be/has been downloaded. File priority is set elsewhere, so I didn't really care for the priority of individual pieces, except for the not downloading bit.
So these two are equal in the script, because I considered this approach "good enough"  ;)   

Inverness

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #27 on: March 09, 2015, 11:06:43 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.
I'm having this same error using uTorrent 3.3.2.

Douman

  • Newbie
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #28 on: March 10, 2015, 06:08:32 AM »

Still, i'm unable to understand how we should form:
piece_priority
pieces

@Danzig
Why in your script these variables are equal?

According to documentation:
piece_priority - string of bytes. Each byte is interpreted as an integer and is the priority of that piece.
pieces - A string with piece flags, one character per piece. Bit 1 means we have that piece. Bit 2 means we have verified that this piece is correct. This only applies when the torrent is in seed_mode.

Yeah, pieces means that we have a piece (or not), but despite the documentation bit 2 doesn't seem to matter much to qbittorent, so I just set it to 1 when we have the piece, 0 when we don't.
piece_priority is 0 when a the piece belongs to a file not to be downloaded, and 1 (and perhaps 2,3,4+) when it has to be/has been downloaded. File priority is set elsewhere, so I didn't really care for the priority of individual pieces, except for the not downloading bit.
So these two are equal in the script, because I considered this approach "good enough"  ;)
Ok, i see.
Well, one more thing, i cannot comprehend that fully:
res['have'].unpack('b*').first.scan(/./).map {|i| (i.to_i(2)*1) }.pack('C'*npieces)
Code: [Select]
unpuck(b*) - returns list of strings with bits? What would be a separator? Or it as regex takes all 0 and 1?
first - takes the [0]?
scan(/./) - takes 1 number?

i.to_i(2)*1 - um... 1?
pack(C*npieces) - creates string from result of map?
« Last Edit: March 10, 2015, 07:32:44 AM by Douman »

Danzig

  • Newbie
  • *
  • Posts: 18
  • Karma: +5/-0
    • View Profile
Re: Migrate from uTorrent to qBittorrent easily
« Reply #29 on: March 10, 2015, 08:23:43 AM »
Well, one more thing, i cannot comprehend that fully:
res['have'].unpack('b*').first.scan(/./).map {|i| (i.to_i(2)*1) }.pack('C'*npieces)
Code: [Select]
unpuck(b*) - returns list of strings with bits? What would be a separator? Or it as regex takes all 0 and 1?
first - takes the [0]?
scan(/./) - takes 1 number?

i.to_i(2)*1 - um... 1?
pack(C*npieces) - creates string from result of map?

res['have'] has one bit for every piece (1=we have the piece, 0=we don't)
There's no separator, it just maps every single bit in res['have'] to one byte (0x01 or 0x00)
« Last Edit: March 10, 2015, 09:09:21 AM by Danzig »