Page 2 of 11
Re: Migrate from uTorrent to qBittorrent easily
Posted: Sun Mar 08, 2015 8:04 pm
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
Re: Migrate from uTorrent to qBittorrent easily
Posted: Sun Mar 08, 2015 10:54 pm
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
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 12:16 pm
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....
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 12:52 pm
by ciaobaby
Also i don't get what is tPunchup()
Probably this,
http://en.wikipedia.org/wiki/Hole_punching
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 3:17 pm
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

Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 3:24 pm
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.
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 3:37 pm
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?"

)
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 3:55 pm
by Nemo
Thanks for your efforts and time that you put into it Danzig.
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 4:16 pm
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!
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 4:20 pm
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.
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 4:29 pm
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.
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 9:16 pm
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"
Re: Migrate from uTorrent to qBittorrent easily
Posted: Mon Mar 09, 2015 10:06 pm
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.
Re: Migrate from uTorrent to qBittorrent easily
Posted: Tue Mar 10, 2015 5:08 am
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?
Re: Migrate from uTorrent to qBittorrent easily
Posted: Tue Mar 10, 2015 7:23 am
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)