Migrate from uTorrent to qBittorrent easily

Windows specific questions, problems.
Danzig

Re: Migrate from uTorrent to qBittorrent easily

Post by Danzig »

[quote="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.
[/quote]

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 edited by Danzig on Sun Mar 08, 2015 8:25 pm, edited 1 time in total.
goakiller900

Re: Migrate from uTorrent to qBittorrent easily

Post by goakiller900 »

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 edited by goakiller900 on Sun Mar 08, 2015 11:35 pm, edited 1 time in total.
Douman

Re: Migrate from uTorrent to qBittorrent easily

Post by Douman »

@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 edited by Douman on Mon Mar 09, 2015 2:15 pm, edited 1 time in total.
ciaobaby

Re: Migrate from uTorrent to qBittorrent easily

Post by ciaobaby »

Also i don't get what is tPunchup()
Probably this, http://en.wikipedia.org/wiki/Hole_punching
nico910

Re: Migrate from uTorrent to qBittorrent easily

Post by nico910 »

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

Re: Migrate from uTorrent to qBittorrent easily

Post by Danzig »

[quote="Douman"]
@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....
[/quote]

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

Re: Migrate from uTorrent to qBittorrent easily

Post by Douman »

Well for now i used Bittorrent lib for python.

Anyway i started a bit of porting:
https://github.com/DoumanAsh/collection ... nvertor.py

For now i dont get 3 places in mkfr()
It would be great if you could explain it to me(grep for "wat?" :) )
User avatar
Nemo
Administrator
Administrator
Posts: 1744
Joined: Sat Jul 24, 2010 6:24 pm

Re: Migrate from uTorrent to qBittorrent easily

Post by Nemo »

Thanks for your efforts and time that you put into it Danzig.
Danzig

Re: Migrate from uTorrent to qBittorrent easily

Post by Danzig »

[quote="Douman"]
Well for now i used Bittorrent lib for python.

Anyway i started a bit of porting:
https://github.com/DoumanAsh/collection ... nvertor.py

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

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

Re: Migrate from uTorrent to qBittorrent easily

Post by Danzig »

[quote="Nemo"]
Thanks for your efforts and time that you put into it Danzig.
[/quote]

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

Re: Migrate from uTorrent to qBittorrent easily

Post by Douman »

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 edited by Douman on Mon Mar 09, 2015 7:27 pm, edited 1 time in total.
Danzig

Re: Migrate from uTorrent to qBittorrent easily

Post by Danzig »

[quote="Douman"]

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

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

Re: Migrate from uTorrent to qBittorrent easily

Post by Inverness »

[quote="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.
[/quote]
I'm having this same error using uTorrent 3.3.2.
Douman

Re: Migrate from uTorrent to qBittorrent easily

Post by Douman »

[quote="Danzig"]
[quote="Douman"]

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

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

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 edited by Douman on Tue Mar 10, 2015 6:32 am, edited 1 time in total.
Danzig

Re: Migrate from uTorrent to qBittorrent easily

Post by Danzig »

[quote="Douman"]
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 all

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

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 edited by Danzig on Tue Mar 10, 2015 8:09 am, edited 1 time in total.
Post Reply