qBittorrent official forums

qBittorrent => Windows => Topic started by: rumanzo on April 10, 2018, 10:52:34 am

Title: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on April 10, 2018, 10:52:34 am
Disappointed in the existing application on the ruby, which could not handle all my torrents, I wrote my own application on golang.
I tested it on my own torrent database (3k+) and test torrents on Bittorrent/uTorrent clients (version 3+).
Features:

* This torrents will not be done (0%) and will need force rehash
** The calculation of the completed parts is based only on the priority of the files in torrent
*** Partially downloaded torrents will be visible as 100% completed, but in fact you will need to do a rehash. Without rehash torrents not will be valid. This is due to the fact that conversion of .dat files in which parts of objects are stored is not implemented.

Don't forget before use make backup bittorrent\utorrent, qbittorrent folder. and config %APPDATA%/Roaming/qBittorrent/qBittorrent.ini. Close all this program before.

Usage:
If you MacOs user don't forget to make the file executable:
Code: [Select]
$ chmod +x bt2qbt_v1.1_amd64_macos

1.) Help (from cmd or powerwhell)
Code: [Select]
C:\Users\user\Downloads> .\bt2qbt_v1.1_amd64.exe -h
Usage of C:\Users\user\Downloads\bt2qbt_v1.1_amd64.exe:
-c, --qconfig (= "C:\\Users\\user\\AppData\\Roaming\\qBittorrent\\qBittorrent.ini")
    qBittorrent config files (for write tags)
-d, --destination (= "C:\\Users\\user\\AppData\\Local\\qBittorrent\\BT_backup\\")
    Destination directory BT_backup (as default)
-s, --source (= "C:\\Users\\user\\AppData\\Roaming\\uTorrent\\")
    Source directory that contains resume.dat and torrents files
--without-labels  (= false)
    Do not export/import labels
--without-tags  (= false)
    Do not export/import tags

2.) If you just run application, it will processing torrents from %APPDATA%\uTorrent\ to %LOCALAPPDATA%\qBittorrent\BT_BACKUP\
Example:
Code: [Select]
It will be performed processing from directory C:\Users\user\AppData\Roaming\uTorrent\ to directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\
Check that the qBittorrent is turned off and the directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\ and config C:\Users\user\AppData\Roaming\qBittorrent\qBittorrent.ini is backed up.


Press Enter to start

Started
1/2 Sucessfully imported 1.torrent
2/2 Sucessfully imported 2.torrent

Press Enter to exit

3.) Run application from cmd or powershell with keys, if you want change source dir or destination dir, or export/import behavior
Example:
Code: [Select]
C:\Users\user\Downloads> .\bt2qbt_v1.1_amd64.exe -s C:\Users\user\AppData\Roaming\BitTorrent\
It will be performed processing from directory C:\Users\user\AppData\Roaming\BitTorrent\ to directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\
Check that the qBittorrent is turned off and the directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\ is backed up.

Press Enter to start
Started
1/3233 Sucessfully imported 1.torrent
2/3233 Sucessfully imported 2.torrent
3/3233 Sucessfully imported 3.torrent
...
3231/3233 Sucessfully imported 3231.torrent
3232/3233 Sucessfully imported 3232.torrent
3233/3233 Sucessfully imported 3233.torrent

Press Enter to exit

Known issuses:

Here's the project: https://github.com/rumanzo/bt2qbt
Code:  https://github.com/rumanzo/bt2qbt/blob/master/bt2qbt.go
Releases: https://github.com/rumanzo/bt2qbt/releases
x86_64 version binary: https://github.com/rumanzo/bt2qbt/releases/download/v1.1/bt2qbt_v1.1_amd64.exe
i386 version binary: https://github.com/rumanzo/bt2qbt/releases/download/v1.1/bt2qbt_v1.1_i386.exe
x86_64 MacOs binary: https://github.com/rumanzo/bt2qbt/releases/download/v1.1/bt2qbt_v1.1_amd64_macos

Deluge branch:
Here's the project: https://github.com/rumanzo/deluge2qbt
code: https://github.com/rumanzo/deluge2qbt/blob/master/deluge2qbt.go
Releases:https://github.com/rumanzo/deluge2qbt/releases
x86_64 version binary: https://github.com/rumanzo/deluge2qbt/releases/download/v1.1/deluge2qbt_v1.1_amd64.exe
i386 version binary: https://github.com/rumanzo/deluge2qbt/releases/download/v1.1/deluge2qbt_v1.1_i386.exe
x86_64 linux version binary: https://github.com/rumanzo/deluge2qbt/releases/download/v1.1/deluge2qbt_linux_v1.1_amd64
i386 linux  version binary: https://github.com/rumanzo/deluge2qbt/releases/download/v1.1/deluge2qbt_linux_v1.1_i386

If there are any errors or if it help you - write there
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: sledgehammer_999 on May 06, 2018, 12:26:08 pm
  • Processing torrents with non-standard encodings (for example, cp1251)

Do you mean filename encodings inside the torrent file? If so, what do you do with that?
.torrent files should have utf8 encoding for the filenames. Otherwise, libtorrent replaces invalid utf8 codepoints with an underscore "_". Do you handle this?
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 06, 2018, 02:10:50 pm
  • Processing torrents with non-standard encodings (for example, cp1251)

Do you mean filename encodings inside the torrent file? If so, what do you do with that?
.torrent files should have utf8 encoding for the filenames. Otherwise, libtorrent replaces invalid utf8 codepoints with an underscore "_". Do you handle this?
To be honest, I just take the name field name.utf-8 and path.utf-8 in the torrent file if they exists, and in this form I feed to the bencode library. I did not meet any problems, and I did not think that complications could occur. But I can do a check on the validity of the runes (https://golang.org/pkg/unicode/utf8/#Valid).

Despite the fact that the code works nominally, for me there are still things that I do not really understand where to get it  and I would like to rewrite it. But I'm not at all familiar with c/c++ code. If you could tell me a couple of things - that would be fine.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: sledgehammer_999 on May 06, 2018, 02:25:20 pm
Despite the fact that the code works nominally, for me there are still things that I do not really understand where to get it  and I would like to rewrite it. But I'm not at all familiar with c/c++ code. If you could tell me a couple of things - that would be fine.

Ask here, and if I see it I'll try to answer.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 06, 2018, 02:54:19 pm
Despite the fact that the code works nominally, for me there are still things that I do not really understand where to get it  and I would like to rewrite it. But I'm not at all familiar with c/c++ code. If you could tell me a couple of things - that would be fine.

Ask here, and if I see it I'll try to answer.
1.) Will the check runes for utf-8 be correct?
2.) I do not understand how to correctly calculate "blocks per piece" in fastresume. Now I'm using the logic from the previous scripts (on ruby), it works, but I do not like the concept of using fields from BitTorrent resume.dat for this. How to count this field?
3.) I fill the "pieces" field by the number of torrentfile["info"]["lenght"] or sum lenght of files if it multifile torrent / torrentfile["info"]["piece length"] rounded to a larger number. Is it correct?
4.) Now i rehash all my torrents, and some my torrents in which not all files have been selected for downloading, no fully completed. That's ok, bittorrent/utorent create ~BitTorrentPartFile.*.dat, which contain some data, and i not convert it. I am confused that after rehash torrents just stuck. Any idea why this is possible?
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: sledgehammer_999 on May 06, 2018, 03:17:01 pm
1.) Will the check runes for utf-8 be correct?

IIRC, normally you don't need to bother with the filenames. You do that if a) the user has renamed the file from inside utorrent b)or has explicitly moved it outside of the folder
In any case, you can't edit the .torrent files because it will change the infohash. The original filenames come from the .torrent. Libtorrent does a sanity check, and replaces invalid utf8 codepoints with and underscore ("_"). And uses this new sanitized string to look for files on disk.

I hope we are talking about the same thing/spot and I am not confusing you.

2.) I do not understand how to correctly calculate "blocks per piece" in fastresume. Now I'm using the logic from the previous scripts (on ruby), it works, but I do not like the concept of using fields from BitTorrent resume.dat for this. How to count this field?

I hope I talking about the same thing.
Unless I am mistaken blocks are always 16KiB. So a piece contains set number of 16KiB blocks. The only exception is the end piece which might contain less data.
I assume that you have to take the piece size from the .torrent file and divide it by 16KiB.

3.) I fill the "pieces" field by the number of torrentfile["info"]["lenght"] or sum lenght of files if it multifile torrent / torrentfile["info"]["piece length"] rounded to a larger number. Is it correct?

I think not. Maybe the calculation of the number of pieces is correct. The data you fill the piece array might not be correct.
Some more info:
Here's an old explanation by me on what I had found on resume.dat when I experimented with it. Link to specific comment (https://qbforums.shiki.hu/index.php/topic,1562.msg4928.html#msg4928). You might want to read the thread from the start to get any other useful info.
And from libtorrent docs here's an explanation on what various fields in the fastresume do: https://libtorrent.org/manual-ref.html#fast-resume

4.) Now i rehash all my torrents, and some my torrents in which not all files have been selected for downloading, no fully completed. That's ok, bittorrent/utorent create ~BitTorrentPartFile.*.dat, which contain some data, and i not convert it. I am confused that after rehash torrents just stuck. Any idea why this is possible?

Maybe it is in weird state, or you just don't have any peers anymore?
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 06, 2018, 03:58:23 pm
Quote
IIRC, normally you don't need to bother with the filenames. You do that if a) the user has renamed the file from inside utorrent b)or has explicitly moved it outside of the folder
In any case, you can't edit the .torrent files because it will change the infohash. The original filenames come from the .torrent. Libtorrent does a sanity check, and replaces invalid utf8 codepoints with and underscore ("_"). And uses this new sanitized string to look for files on disk.

I hope we are talking about the same thing/spot and I am not confusing you.
It looks like I do not really need to worry about this.

Quote
I hope I talking about the same thing.
Unless I am mistaken blocks are always 16KiB. So a piece contains set number of 16KiB blocks. The only exception is the end piece which might contain less data.
I assume that you have to take the piece size from the .torrent file and divide it by 16KiB.
It is! So simple, thanks.

Quote
I think not. Maybe the calculation of the number of pieces is correct. The data you fill the piece array might not be correct.
Some more info:
Here's an old explanation by me on what I had found on resume.dat when I experimented with it. Link to specific comment. You might want to read the thread from the start to get any other useful info.

And from libtorrent docs here's an explanation on what various fields in the fastresume do: https://libtorrent.org/manual-ref.html#fast-resume

Thanks for links. But I'm not sure that we're talking about the same thing. I mean the length of the "pieces" field. I fill it with 0 or 1 (0x00 or 0x01), it's correct. If calculation of the number of pieces is correct, it's all right.

Quote
Maybe it is in weird state, or you just don't have any peers anymore?
This does not apply to all torrents, and in the log, I see a io error ... error: permission denied. Apparently this is due not to the torrents themselves, but to something else. I'll try to figure out the other day.


P.S. I try to modify top message and got error:
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: sledgehammer_999 on May 06, 2018, 04:27:00 pm
Thanks for links. But I'm not sure that we're talking about the same thing. I mean the length of the "pieces" field. I fill it with 0 or 1 (0x00 or 0x01), it's correct. If calculation of the number of pieces is correct, it's all right.

IMO, the length should be taken from the .torrent file. It has a "pieces" field too.
About the "pieces" field in the fastresume: That's a byte array (or byte string). Each element is one byte(character) and represents one piece. Each byte has 8bits. Setting the 1st bit means we have that piece. Setting the 2nd means that we verified that piece aka it passed the hash check. If that piece is unverified, it usually gets hash-checked during seeding when it is requested for upload.
So, if I am not mistaken the correct values are:
1. 0x0 -> piece not downloaded
2. 0x80 -> piece downloaded but not verified
3. 0xc0 -> piece downloaded and verified
4. 0x40 -> I don't think this is valid. It means piece not downloaded but verified.

(those values were obtained from online binary to hex converters)

This does not apply to all torrents, and in the log, I see a io error ... error: permission denied. Apparently this is due not to the torrents themselves, but to something else. I'll try to figure out the other day.

Then that probably means that something's wrong with the conversion.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 06, 2018, 04:54:38 pm
IMO, the length should be taken from the .torrent file. It has a "pieces" field too.
It has, but I can not find the connection between that number and what should be.
For example:
In torrent file - piece lenght = 8388608, len pieces - 105960
In fastresume file - len pieces - 5298.
It's seems like len(fr[pieces]) = len(tr[pieces])/20. But i don't sure and don't understand why.
About the "pieces" field in the fastresume: That's a byte array (or byte string). Each element is one byte(character) and represents one piece. Each byte has 8bits. Setting the 1st bit means we have that piece. Setting the 2nd means that we verified that piece aka it passed the hash check. If that piece is unverified, it usually gets hash-checked during seeding when it is requested for upload.
Correct.

Then that probably means that something's wrong with the conversion.
It's sad. Will debug this.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: sledgehammer_999 on May 06, 2018, 05:16:31 pm
It has, but I can not find the connection between that number and what should be.
For example:
In torrent file - piece lenght = 8388608, len pieces - 105960
In fastresume file - len pieces - 5298.
It's seems like len(fr[pieces]) = len(tr[pieces])/20. But i don't sure and don't understand why.

It seems I was slightly wrong.
The bittorrent BEP (http://www.bittorrent.org/beps/bep_0003.html) says this about the "pieces" field:
Quote
pieces maps to a string whose length is a multiple of 20. It is to be subdivided into strings of length 20, each of which is the SHA1 hash of the piece at the corresponding index.

And that's why you need to divide by 20 in your example.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 06, 2018, 06:17:59 pm
It has, but I can not find the connection between that number and what should be.
For example:
In torrent file - piece lenght = 8388608, len pieces - 105960
In fastresume file - len pieces - 5298.
It's seems like len(fr[pieces]) = len(tr[pieces])/20. But i don't sure and don't understand why.

It seems I was slightly wrong.
The bittorrent BEP (http://www.bittorrent.org/beps/bep_0003.html) says this about the "pieces" field:
Quote
pieces maps to a string whose length is a multiple of 20. It is to be subdivided into strings of length 20, each of which is the SHA1 hash of the piece at the corresponding index.

And that's why you need to divide by 20 in your example.

Thanks!

And I found problem with my torrents - why then on some files there was an attribute Read-only.
And I still can't modify top message, who can help with that?
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: sledgehammer_999 on May 06, 2018, 06:55:31 pm
Do you click the "Modify" button in your first post and you have those errors?
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 06, 2018, 07:07:38 pm
Do you click the "Modify" button in your first post and you have those errors?
Yes, if i try modify throw top button "Modify" a get this error. If i try use down button, nothing happens.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: Peter on May 06, 2018, 10:38:39 pm
Do you click the "Modify" button in your first post and you have those errors?
Yes, if i try modify throw top button "Modify" a get this error. If i try use down button, nothing happens.

Can you please PM me the error you get when you try Modify?
Thank you!
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: Gun on May 08, 2018, 02:52:44 am
Hi, getting this error with 0.6 x64

Code: [Select]
panic: interface conversion: interface {} is []interface {}, not string

goroutine 263 [running]:
main.(*NewTorrentStructure).gettrackers(0xc043cae2c0, 0xc042b47f00, 0x2, 0x4)
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/bt2qbt/bt2qbt.go:212 +0x1e9
main.logic(0xc042b31120, 0x1e, 0xc042a590e0, 0xc04204c2f0, 0xc04200e180, 0xc04200e181, 0xc04204c300, 0xc042c6a2a0, 0x1af, 0xc04207dc90, ...)
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/bt2qbt/bt2qbt.go:407 +0xa79
created by main.main
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/bt2qbt/bt2qbt.go:510 +0xcd4

In 0.4 it looks like this

Code: [Select]
panic: runtime error: index out of range

goroutine 275 [running]:
main.logic(0xc042d11630, 0x42, 0xc042cf3140, 0xc04204c300, 0xc04200e180, 0xc04200e181, 0xc04204c310, 0xc042c6fe00, 0x1af, 0xc04207dc90, ...)
        /home/kostinan/1T/testinggo/src/bt2qbt/bt2qbt.go:261 +0x5d40
created by main.main
        /home/kostinan/1T/testinggo/src/bt2qbt/bt2qbt.go:414 +0xcd4
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 08, 2018, 07:28:15 pm
Hi, getting this error with 0.6 x64

Code: [Select]
panic: interface conversion: interface {} is []interface {}, not string

goroutine 263 [running]:
main.(*NewTorrentStructure).gettrackers(0xc043cae2c0, 0xc042b47f00, 0x2, 0x4)
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/bt2qbt/bt2qbt.go:212 +0x1e9
main.logic(0xc042b31120, 0x1e, 0xc042a590e0, 0xc04204c2f0, 0xc04200e180, 0xc04200e181, 0xc04204c300, 0xc042c6a2a0, 0x1af, 0xc04207dc90, ...)
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/bt2qbt/bt2qbt.go:407 +0xa79
created by main.main
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/bt2qbt/bt2qbt.go:510 +0xcd4

In 0.4 it looks like this

Code: [Select]
panic: runtime error: index out of range

goroutine 275 [running]:
main.logic(0xc042d11630, 0x42, 0xc042cf3140, 0xc04204c300, 0xc04200e180, 0xc04200e181, 0xc04204c310, 0xc042c6fe00, 0x1af, 0xc04207dc90, ...)
        /home/kostinan/1T/testinggo/src/bt2qbt/bt2qbt.go:261 +0x5d40
created by main.main
        /home/kostinan/1T/testinggo/src/bt2qbt/bt2qbt.go:414 +0xcd4
Thanks for feedback. Fixed in version 0.6
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: Nemo on May 08, 2018, 11:40:33 pm
Thanks for your time and effort rumanzo.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: Gun on May 09, 2018, 12:51:30 pm
Feature request. If it makes sense.
In uTorrent parts file stored in torrent subfolder (if exists), but in qBittorrent it's always in download location. I prefer uTorrent way. You can do it in qBittorent, if you chose not to create subfolder and append it to download location instead.
Can this be an option?

I'm new to qBittorrent, so if there is another approach to parts file situation, let me know.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: Tribaphil on May 29, 2018, 06:24:42 am
thanks for taking the time to make the tool!  i'm struggling to get my 2200 torrents over to qbt.

Getting the error below on every version.  no command line parameters

Quote
panic: interface conversion: interface {} is nil, not []interface {}

goroutine 1 [running]:
main.main()
        /home/kostinan/1T/testinggo/src/bt2qbt/bt2qbt.go:543 +0x1edd

italicized line changes depending on version, i can provide specifics if needed.

thanks for help!
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on May 29, 2018, 09:52:27 am
thanks for taking the time to make the tool!  i'm struggling to get my 2200 torrents over to qbt.

Getting the error below on every version.  no command line parameters

Quote
panic: interface conversion: interface {} is nil, not []interface {}

goroutine 1 [running]:
main.main()
        /home/kostinan/1T/testinggo/src/bt2qbt/bt2qbt.go:543 +0x1edd

italicized line changes depending on version, i can provide specifics if needed.

thanks for help!
Thanks for bugreport. I fix it in version 0.9, check it :-) .
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: napouser on June 12, 2018, 12:24:41 am
hello

i have tried this tool but my stats remained unchanged

total downloaded uploaded uptime torrents added etc

is there a tool to transfer stats as well? i imagine this is useless to most people but when u have hundreds of tb it is not
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on June 12, 2018, 12:37:13 am
hello

i have tried this tool but my stats remained unchanged

total downloaded uploaded uptime torrents added etc

is there a tool to transfer stats as well? i imagine this is useless to most people but when u have hundreds of tb it is not
Hi! I transferred all my torrents, and all stats transfer as well. How look that's info in qbittorrent? There was any errors on transfer?
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: napouser on June 12, 2018, 05:46:21 am
hello

i have tried this tool but my stats remained unchanged

total downloaded uploaded uptime torrents added etc

is there a tool to transfer stats as well? i imagine this is useless to most people but when u have hundreds of tb it is not
Hi! I transferred all my torrents, and all stats transfer as well. How look that's info in qbittorrent? There was any errors on transfer?


no errors
are we talking about the same stats here?
i am not talking about individual torrent stats i am talking about global stats in view statistics menu
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on June 12, 2018, 11:42:03 am
hello

i have tried this tool but my stats remained unchanged

total downloaded uploaded uptime torrents added etc

is there a tool to transfer stats as well? i imagine this is useless to most people but when u have hundreds of tb it is not
Hi! I transferred all my torrents, and all stats transfer as well. How look that's info in qbittorrent? There was any errors on transfer?


no errors
are we talking about the same stats here?
i am not talking about individual torrent stats i am talking about global stats in view statistics menu
That explains everything, I did not think about it. I see what can be done.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on June 13, 2018, 11:09:03 pm
hello

i have tried this tool but my stats remained unchanged

total downloaded uploaded uptime torrents added etc

is there a tool to transfer stats as well? i imagine this is useless to most people but when u have hundreds of tb it is not
Hi! I transferred all my torrents, and all stats transfer as well. How look that's info in qbittorrent? There was any errors on transfer?


no errors
are we talking about the same stats here?
i am not talking about individual torrent stats i am talking about global stats in view statistics menu
I looked at how it was implemented saving statistics in qBt, and I don't see a way how I could do it in a simple way.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: napouser on June 19, 2018, 04:14:17 pm
yea i know they have done it to be too hard for some wierd reason
well i guess will be staying with utorrent then
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on June 19, 2018, 04:37:12 pm
yea i know they have done it to be too hard for some wierd reason
well i guess will be staying with utorrent then
I can't say that they do it hard, just use c++ and qt.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: SupaMonkey on July 09, 2018, 08:23:19 am
Will this work with Deluge? Currently on deluge and tearing my hair out so want to move all 2.5k torrents i have on deluge over to qbt.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on July 09, 2018, 09:05:27 am
Will this work with Deluge? Currently on deluge and tearing my hair out so want to move all 2.5k torrents i have on deluge over to qbt.
Now this not import from deluge. I can see how the data is stored in the Deluge and at leisure to write a fork. Wait
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: SupaMonkey on July 09, 2018, 05:00:13 pm
Now this not import from deluge. I can see how the data is stored in the Deluge and at leisure to write a fork. Wait
Great! Thank you rumanzo!
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on July 10, 2018, 08:29:57 am
Now this not import from deluge. I can see how the data is stored in the Deluge and at leisure to write a fork. Wait
Great! Thank you rumanzo!
Good news! Both of them uses libtorrent, this makes work much easier, yesterday I almost finished, only thing left is to finish processing the labels. I'm having trouble choosing whether to import labels as labels, or as tags? or export both, and then who will need to remove the excess?
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: IronMan on July 14, 2018, 07:06:17 pm
it says in the topic utorrent 3.x
does it anyway work with utorrent 2.x ?

Also does it work if you already have a working qbittorrent ?
without losing that info ?
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on July 15, 2018, 10:56:18 am
it says in the topic utorrent 3.x
does it anyway work with utorrent 2.x ?

Also does it work if you already have a working qbittorrent ?
without losing that info ?
I did not check, but it should work theoretically with version 2 as well. As a maximum, you will need to turn off the import of tags. And you can import in already existing qBittorrent, but I still advise you to make backups
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on July 17, 2018, 01:15:16 am
Now this not import from deluge. I can see how the data is stored in the Deluge and at leisure to write a fork. Wait
Great! Thank you rumanzo!
I found a time, and I finished it. Surface tested, if there are errors tell me.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: IronMan on July 17, 2018, 06:45:38 am
I did not check, but it should work theoretically with version 2 as well. As a maximum, you will need to turn off the import of tags. And you can import in already existing qBittorrent, but I still advise you to make backups

I tested it and it worked,
Had to force shutdown qbittorrent and recover the backup.
Because it was moving all my files from the original destination to the download location from qbittorrent.
Title: Re: Windows CLI tool for migration from Bittorrent/uTorrent (3.x) to qBittorrent
Post by: rumanzo on July 17, 2018, 07:56:15 am
I did not check, but it should work theoretically with version 2 as well. As a maximum, you will need to turn off the import of tags. And you can import in already existing qBittorrent, but I still advise you to make backups

I tested it and it worked,
Had to force shutdown qbittorrent and recover the backup.
Because it was moving all my files from the original destination to the download location from qbittorrent.
Do not quite understand what the problem was. And you probably mean copying, not moving?
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: IronMan on July 17, 2018, 11:13:12 pm
Could be it was copying all my episodes to the download drive.
But my download drive isn't that big.
So I got all my collected episodes on other drives and it should stay there and seed from that location where it's stored now.
And not copy or move the files.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: SupaMonkey on August 09, 2018, 09:34:37 am
Hi Rumanzo,
Been really busy - but finally got around to testing your deluge > qbittorrent tool.

Feedback:
I have 2175 total torrents in deluge
Your tool only picked up 1726

 - I thought this is because the remaining 449 are all on 0 bytes - but I checked this, and there are actually 657 on 0 bytes - but im pretty sure its related

of the 1726, it imported 1518/1726 Sucessfully imported
After that, it started throwing out errors like:
Can't find torrent file C:\Users\myusername\AppData\Roaming\deluge\state\3bd0401f05be1d70ead47216a2d021b91138084f.torrent for 3bd0401f05be1d70ead47216a2d021b91138084f

a handful of them had a different error:
Can't decode torrent file C:\Users\myusername\AppData\Roaming\deluge\state\ed5dfed132c31bb94ab2724e0fec96940a7685c0.torrent for ed5dfed132c31bb94ab2724e0fec96940a7685c0

Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: ReallyCoolName on August 09, 2018, 11:24:11 pm
Hello, I have a feedback too.
Thanks for your program, it's cool.

The last added torrent I have is a magnet link, and your program didn't handle it properly:
724/723 Can't decode torrent file C:\Users\<username>\AppData\Roaming\uTorrent\magnet:
?xt=urn:btih:<hash>&dn=<name> for magnet:?
xt=urn:btih:<hash>&dn=<name>


Everything else is just fine.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 09, 2018, 11:53:42 pm
Hi Rumanzo,
Been really busy - but finally got around to testing your deluge > qbittorrent tool.

Feedback:
I have 2175 total torrents in deluge
Your tool only picked up 1726

 - I thought this is because the remaining 449 are all on 0 bytes - but I checked this, and there are actually 657 on 0 bytes - but im pretty sure its related

of the 1726, it imported 1518/1726 Sucessfully imported
After that, it started throwing out errors like:
Can't find torrent file C:\Users\myusername\AppData\Roaming\deluge\state\3bd0401f05be1d70ead47216a2d021b91138084f.torrent for 3bd0401f05be1d70ead47216a2d021b91138084f

a handful of them had a different error:
Can't decode torrent file C:\Users\myusername\AppData\Roaming\deluge\state\ed5dfed132c31bb94ab2724e0fec96940a7685c0.torrent for ed5dfed132c31bb94ab2724e0fec96940a7685c0

The torrents that occupy 0 bytes should also be imported. What are some errors except the missing torrent files were? And I ask you to check whether there are actually torrent files with given names (maybe in another place?). Or are they invalid?

Hello, I have a feedback too.
Thanks for your program, it's cool.

The last added torrent I have is a magnet link, and your program didn't handle it properly:
724/723 Can't decode torrent file C:\Users\<username>\AppData\Roaming\uTorrent\magnet:
?xt=urn:btih:<hash>&dn=<name> for magnet:?
xt=urn:btih:<hash>&dn=<name>


Everything else is just fine.

I watched the processing of magnet references. If the link is valid, the torrent is downloaded and the link changes to a torrent file. I suppose these torrents with magnet links are invalid?
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: ReallyCoolName on August 10, 2018, 12:16:51 am
I suppose these torrents with magnet links are invalid?

No, it's valid torrents, but it didn't load additional info by DHT yet when I used your tool.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 11, 2018, 02:27:01 pm
I suppose these torrents with magnet links are invalid?

No, it's valid torrents, but it didn't load additional info by DHT yet when I used your tool.
OK, we'll fix it, I'll need your help. But I will have no time at least 2 weeks.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: Peter on August 13, 2018, 09:32:36 am
Amazing script, just helped a user on Discord with it.
Deluge version was used.

- You have to replace the line 10:
Code: [Select]
OLD: "launchpad.net/gnuflag"
NEW: "github.com/juju/gnuflag"

- I had to install the "Go deps" by hand:
Code: [Select]
go get github.com/fatih/color
go get github.com/go-ini/ini
go get github.com/zeebo/bencode
go get github.com/juju/gnuflag

- Then I just used this command (which is duh):
Code: [Select]
go run deluge2qbt-fixed.go -c ~/.config/qBittorrent/qBittorrent.conf -d ~/.local/share/data/qBittorrent/BT_backup/ -s ~/.config/deluge/
Again, thank you OP for the wonderful, superb work. It worked like a charm.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 13, 2018, 10:00:48 am
Amazing script, just helped a user on Discord with it.
Deluge version was used.

- You have to replace the line 10:
Code: [Select]
OLD: "launchpad.net/gnuflag"
NEW: "github.com/juju/gnuflag"

- I had to install the "Go deps" by hand:
Code: [Select]
go get github.com/fatih/color
go get github.com/go-ini/ini
go get github.com/zeebo/bencode
go get github.com/juju/gnuflag

- Then I just used this command (which is duh):
Code: [Select]
go run deluge2qbt-fixed.go -c ~/.config/qBittorrent/qBittorrent.conf -d ~/.local/share/data/qBittorrent/BT_backup/ -s ~/.config/deluge/
Again, thank you OP for the wonderful, superb work. It worked like a charm.

Peter, I'm glad to see that!
The official source of gnuflag is located in the repository launchpad and they use the vcs bazaar. You may install bazaar on windows or linux, and do "go get -v" from the root of project directory, go download all sources automatically. But I'm still glad that you did it. Do you write on golang?
By the way, I obviously need to compile a binary file for Linux?
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on September 02, 2018, 10:34:09 pm
I suppose these torrents with magnet links are invalid?

No, it's valid torrents, but it didn't load additional info by DHT yet when I used your tool.
We can try to fix this, are you ready?


I'am also compiled version deluge2qbt for Linux
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: napouser on September 12, 2018, 07:03:46 pm
hi
last time i checked was quite impossible but
its been a long time does any1 managed to find a way to transfer global stats from ut to qbt?
have in mind stats ar stored in settings.dat

Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on September 12, 2018, 09:15:24 pm
hi
last time i checked was quite impossible but
its been a long time does any1 managed to find a way to transfer global stats from ut to qbt?
have in mind stats ar stored in settings.dat

I didn't say it was impossible. Just need to use the QT framework. In my app, this is difficult to do, because binding with the framework is experimental and quite difficult to set up. And I do not know C/C++ well enough to implement this function in go, or to write on C/C++.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: DeathStalker on November 09, 2018, 10:16:11 pm
How close, realistically, are we to having this functionality?  This is the ONLY reason I have not migrated to QBT - I have ~2k titles in uT 2.2.1.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on November 09, 2018, 11:04:33 pm
What do you mean, when say "this"?
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: DeathStalker on November 10, 2018, 12:23:44 am
Disappointed in the existing application on the ruby, which could not handle all my torrents, I wrote my own application on golang.
I tested it on my own torrent database (3k+) and test torrents on Bittorrent/uTorrent clients (version 3+).
Features:
  • Processing all torrents
  • Processing torrents with subdirectories and without subdirectories
  • Processing torrents with renamed files
  • Processing torrents with non-standard encodings (for example, cp1251)
  • Processing of torrents in the not ready state *
  • Save date, metrics, status. **
  • Import of tags and labels
  • Multithreading

* This torrents will not be done (0%) and will need force rehash
** The calculation of the completed parts is based only on the priority of the files in torrent

Don't forget before use make backup bittorrent\utorrent, qbittorrent folder. and config %APPDATA%/Roaming/qBittorrent/qBittorrent.ini. Close all this program before.

Usage:
1.) Help (from cmd or powerwhell)
Code: [Select]
C:\Users\user\Downloads> .\bt2qbt_v0.1_amd64.exe -h
Usage of C:\Users\user\Downloads\bt2qbt_v0.1_amd64.exe:
-c, --qconfig (= "C:\\Users\\user\\AppData\\Roaming\\qBittorrent\\qBittorrent.ini")
    qBittorrent config files (for write tags)
-d, --destination (= "C:\\Users\\user\\AppData\\Local\\qBittorrent\\BT_backup\\")
    Destination directory BT_backup (as default)
-s, --source (= "C:\\Users\\user\\AppData\\Roaming\\uTorrent\\")
    Source directory that contains resume.dat and torrents files
--without-labels  (= false)
    Do not export/import labels
--without-tags  (= false)
    Do not export/import tags

2.) If you just run application, it will processing torrents from %APPDATA%\uTorrent\ to %LOCALAPPDATA%\qBittorrent\BT_BACKUP\
Example:
Code: [Select]
It will be performed processing from directory C:\Users\user\AppData\Roaming\uTorrent\ to directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\
Check that the qBittorrent is turned off and the directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\ and config C:\Users\user\AppData\Roaming\qBittorrent\qBittorrent.ini is backed up.

Press Enter to start

Started
1/2 Sucessfully imported 1.torrent
2/2 Sucessfully imported 2.torrent

Press Enter to exit

3.) Run application from cmd or powershell with keys, if you want change source dir or destination dir, or export/import behavior
Example:
Code: [Select]
C:\Users\user\Downloads> .\bt2qbt_v0.1_amd64.exe -s C:\Users\user\AppData\Roaming\BitTorrent\
It will be performed processing from directory C:\Users\user\AppData\Roaming\BitTorrent\ to directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\
Check that the qBittorrent is turned off and the directory C:\Users\user\AppData\Local\qBittorrent\BT_backup\ is backed up.

If there are any errors or if it help you - write there
[/quote]

I ran this, made the (apparent) adjustments, but it failed -


PS C:\Temp> C:\Temp> C:\Temp\> .\bt2qbt_v0.1_amd64.exe -h
>> >> Usage of C:\Temp\bt2qbt_v0.1_amd64.exe:
>> >> -c, --qconfig (= "C:\\Users\\username}\\AppData\\Roaming\\qBittorrent\\qBittorrent.ini")
>> >>     qBittorrent config files (for write tags)
>> >> -d, --destination (= "C:\\Users\\{username}\\AppData\\Local\\qBittorrent\\BT_backup\\")
>> >>     Destination directory BT_backup (as default)
>> >> -s, --source (= "J:\\Bit Torrent Clients\\uTorrent v2_2_1 (Build 25302) v3\\")
>> >>     Source directory that contains resume.dat and torrents files
At line:3 char:6
+ >> -c, --qconfig (= "C:\\Users\\{username}\\AppData\\Roaming\\qBitt ...
+      ~
Missing argument in parameter list.
At line:5 char:6
+ >> -d, --destination (= "C:\\Users\\{username}\\AppData\\Local\\qBi ...
+      ~
Missing argument in parameter list.
At line:7 char:6
+ >> -s, --source (= "J:\\Bit Torrent Clients\\uTorrent v2_2_1 (Build 2 ...
+      ~
Missing argument in parameter list.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingArgument


I DO want to import the LABELS.

Also, I am clearly substituting {username} for the User folder.


Thanks for any assistance!!! :)


PS:  I don't suppose there's any chance to evolve this into a GUI where you could more easily browse for the applicable folders and select checkboxes for whether you want labels &/or tags.

EDIT:  Could it have something to do with the fact that I'm not using the Apps folder for uT, but the installation folder?  (I will create that folder and copy the files there as a test!)
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: DeathStalker on November 10, 2018, 12:37:50 am
Now I have the .torrent files stored in various locations.  I was expecting this to parse out the info from the RESUME.DAT file itself, so it knows exactly where the titles are stored.  I'm not sure I see the necessity for the original .torrent files (I hope I'm wrong).

Thanks!
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on November 10, 2018, 12:54:13 am
Now I have the .torrent files stored in various locations.  I was expecting this to parse out the info from the RESUME.DAT file itself, so it knows exactly where the titles are stored.  I'm not sure I see the necessity for the original .torrent files (I hope I'm wrong).

Thanks!
If I correctly understood the last two messages (the previous one is not very well formed):
1.) You need to get the latest version, that is 1.0. You may download at direct link in first post. I did not think that it is necessary to update the examples so that it was clear that you do not need use version 0.1
2.) If you do not want to import labels, then accordingly you need the --without-labels argument when run program, but it appeared in more recent versions.
3.) Torrent files that stored in various locations must be processed. At least I tested it, and all was fine.

Write here when you get the result, please.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: DeathStalker on November 10, 2018, 12:55:58 am
Ok, upon re-reading your post, I ran JUST the EXE in the Downloads folder (properly named, of course) - it *appears* to be successful - at least the torrents it listed indicated successful.  It is taking quite some time for QBT to load (Not Responding but the mem usage is increasing) - ~2k torrents.  Will post an update if/when it successfully launches.


 
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on November 10, 2018, 01:03:21 am
Ok, upon re-reading your post, I ran JUST the EXE in the Downloads folder (properly named, of course) - it *appears* to be successful - at least the torrents it listed indicated successful.  It is taking quite some time for QBT to load (Not Responding but the mem usage is increasing) - ~2k torrents.  Will post an update if/when it successfully launches.
For the first run qbittorrent, this is normal, it will work faster later. I imported about 4 thousand torrents, the same behavior.
In the output of the program at the end there was a message that some torrents were exported with errors?
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: DeathStalker on November 10, 2018, 01:09:35 am
No, no errors were reported, but there were issues with some uncompleted titles - QBT set them back to 0%, even though some were at 97%+.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: DeathStalker on November 10, 2018, 01:25:51 am
Ok, so I actually have both running to test things - I have NO connections with QBT, but I do with uT.

I am concerned about the partially finished titles that apparently were reset to 0% and are re-downloading (especially those that are on ratio-based trackers).
  Upon further examination - it appears that it is not recognizing the .!ut extension of them, ignoring them, and creating new .!qB files.

Also, I noticed that some completed files were also not properly hashed, but manually removing the .!qB extension allowed them to be properly opened - this also happened with RAR-type files as well as PDFs.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on November 11, 2018, 11:45:32 am
Ok, so I actually have both running to test things - I have NO connections with QBT, but I do with uT.

I am concerned about the partially finished titles that apparently were reset to 0% and are re-downloading (especially those that are on ratio-based trackers).
  Upon further examination - it appears that it is not recognizing the .!ut extension of them, ignoring them, and creating new .!qB files.

Also, I noticed that some completed files were also not properly hashed, but manually removing the .!qB extension allowed them to be properly opened - this also happened with RAR-type files as well as PDFs.

It's not a bug. I modify the first topic message:
* This torrents will not be done (0%) and will need force rehash
** The calculation of the completed parts is based only on the priority of the files in torrent
*** Partially downloaded torrents will be visible as 100% completed, but in fact you will need to do a rehash. Without rehash torrents not will be valid. This is due to the fact that conversion of .dat files in which parts of objects are stored is not implemented.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: dm01 on March 26, 2019, 06:52:23 pm
Hello I am a little stupid can you help me?
I want to export 266 torrents from DELUGE to qbittorent.
My deluge list is stored : C:\Users\cagri\AppData\Roaming\deluge\state
My downloaded and seeding files are in d:\torrent
Should I just run exe file, or should I run a command ?
Thanks.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on March 28, 2019, 11:45:45 pm
Hello I am a little stupid can you help me?
I want to export 266 torrents from DELUGE to qbittorent.
My deluge list is stored : C:\Users\cagri\AppData\Roaming\deluge\state
My downloaded and seeding files are in d:\torrent
Should I just run exe file, or should I run a command ?
Thanks.
Hi! You are not stupid, good question :-)
In your's case (if it standard install for deluge and qBittorrent) you can just run exe file and follow instructions.
It makes sense to run program from command line if you need to change the program's behavior (for example, not import tags) or if the user has a non-standard location of Deluge\qBittorrent\uTorrent\Bittorrent files (basically they stored in %APPDATA%).
There are no destructive actions in the program, but if previously qBittorrent was used, then it is better to make a backup.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: dm01 on March 29, 2019, 02:03:26 pm
Hello I am a little stupid can you help me?
I want to export 266 torrents from DELUGE to qbittorent.
My deluge list is stored : C:\Users\cagri\AppData\Roaming\deluge\state
My downloaded and seeding files are in d:\torrent
Should I just run exe file, or should I run a command ?
Thanks.
Hi! You are not stupid, good question :-)
In your's case (if it standard install for deluge and qBittorrent) you can just run exe file and follow instructions.
It makes sense to run program from command line if you need to change the program's behavior (for example, not import tags) or if the user has a non-standard location of Deluge\qBittorrent\uTorrent\Bittorrent files (basically they stored in %APPDATA%).
There are no destructive actions in the program, but if previously qBittorrent was used, then it is better to make a backup.

succesfully exported my torrents. thanks for this small program.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: DeathStalker on April 01, 2019, 06:56:30 pm
Hmmm, so no one has run any tests on the issues that I posted about last year?  Sad.

Maybe it's not an issue if you don't currently use the pre-allocation and !ut extension, I don't know.  But I still feel it is something that should be looked into.  I won't be giving it another try until more testing has been done (not with ~2k titles I current have loaded on multiple trackers).
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on April 01, 2019, 11:38:34 pm
Hmmm, so no one has run any tests on the issues that I posted about last year?  Sad.

Maybe it's not an issue if you don't currently use the pre-allocation and !ut extension, I don't know.  But I still feel it is something that should be looked into.  I won't be giving it another try until more testing has been done (not with ~2k titles I current have loaded on multiple trackers).

I have already said everything.
There is a difference in saving the pieces of files, I tried to compare them and understand the pattern and did not succeed, the bittorrent\utorrent is closed source software, and programming is my hobby (useful for work).
You can prepare for migrating - finish all your downloads before importing, or uncheck the option add !ut|!bt to file extension.

I'm not sure that I will ever be able to implement this feature.
If you want to implement this feature - you can do pull request, or at least help me with the analysis of the difference of saving pieces qBittorrent (*.parts) and uTorrent (*.dat).
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: kkorsch on April 19, 2019, 05:05:11 am
Hi, I'm excited to try your tool.  I currently have uTorrent 2.2.1 and looking to migrate to the latest qBittorrent which I have installed.  When I run v.1.0 of the tool from command prompt in Windows 7 I get the following error message:

C:\TEMP\uTorrent Migration>bt2qbt_v1.0_amd64
It will be performed processing from directory C:\Users\Alan\AppData\Roaming\uTo
rrent\ to directory C:\Users\Alan\AppData\Local\qBittorrent\BT_backup\
Check that the qBittorrent is turned off and the directory C:\Users\Alan\AppData
\Local\qBittorrent\BT_backup\ and config C:\Users\Alan\AppData\Roaming\qBittorre
nt\qBittorrent.ini is backed up.

Press Enter to start

2019/04/18 22:38:38 Started
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
main.main()
        /go/src/bt2qbt/bt2qbt.go:571 +0x11eb

goroutine 22 [chan send]:
main.logic(0xc000035f10, 0x6b, 0xc00005b650, 0xc000030310, 0xc00000a140, 0xc0000
0a141, 0xc000030320, 0xc000558060, 0xc0005580c0, 0x4, ...)
        /go/src/bt2qbt/bt2qbt.go:404 +0x15c1
created by main.main
        /go/src/bt2qbt/bt2qbt.go:562 +0xc38

goroutine 378 [semacquire]:
sync.runtime_Semacquire(0xc00000a078)
        /usr/local/go/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc00000a070)
        /usr/local/go/src/sync/waitgroup.go:130 +0x6b
main.main.func1(0xc00000a070, 0xc000558060, 0xc0005580c0)
        /go/src/bt2qbt/bt2qbt.go:567 +0x32
created by main.main
        /go/src/bt2qbt/bt2qbt.go:566 +0x1085

C:\TEMP\uTorrent Migration>

Same happens when I run with the no tags option.  It seems that someone above was succesful with uTorrent 2 so I figure I must be doing something wrong.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on April 19, 2019, 10:10:31 am
Thanks for writing this message. It's defenetly a bug, i try to fix it in short time
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on April 19, 2019, 11:52:29 am
Hi, I'm excited to try your tool.  I currently have uTorrent 2.2.1 and looking to migrate to the latest qBittorrent which I have installed.  When I run v.1.0 of the tool from command prompt in Windows 7 I get the following error message:

C:\TEMP\uTorrent Migration>bt2qbt_v1.0_amd64
It will be performed processing from directory C:\Users\Alan\AppData\Roaming\uTo
rrent\ to directory C:\Users\Alan\AppData\Local\qBittorrent\BT_backup\
Check that the qBittorrent is turned off and the directory C:\Users\Alan\AppData
\Local\qBittorrent\BT_backup\ and config C:\Users\Alan\AppData\Roaming\qBittorre
nt\qBittorrent.ini is backed up.

Press Enter to start

2019/04/18 22:38:38 Started
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
main.main()
        /go/src/bt2qbt/bt2qbt.go:571 +0x11eb

goroutine 22 [chan send]:
main.logic(0xc000035f10, 0x6b, 0xc00005b650, 0xc000030310, 0xc00000a140, 0xc0000
0a141, 0xc000030320, 0xc000558060, 0xc0005580c0, 0x4, ...)
        /go/src/bt2qbt/bt2qbt.go:404 +0x15c1
created by main.main
        /go/src/bt2qbt/bt2qbt.go:562 +0xc38

goroutine 378 [semacquire]:
sync.runtime_Semacquire(0xc00000a078)
        /usr/local/go/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc00000a070)
        /usr/local/go/src/sync/waitgroup.go:130 +0x6b
main.main.func1(0xc00000a070, 0xc000558060, 0xc0005580c0)
        /go/src/bt2qbt/bt2qbt.go:567 +0x32
created by main.main
        /go/src/bt2qbt/bt2qbt.go:566 +0x1085

C:\TEMP\uTorrent Migration>

Same happens when I run with the no tags option.  It seems that someone above was succesful with uTorrent 2 so I figure I must be doing something wrong.

I can repeat a bug and fix this in version 1.1 https://github.com/rumanzo/bt2qbt/releases . But this deadlock repeats only if bt2qbt can't find all torrent's. Try new verion and if it's not work with you case we will find why this happens.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: simidef on April 28, 2019, 03:36:00 am
Works like charm! Saved me a lot of time and effort!

win7/i386 migrating from utorrent 3.5 (build 44090)

Hats off for great work rumanzo!
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: aaaa1234 on April 28, 2019, 12:47:42 pm
Hello,

I tried using the tool, but it only copied 1 torrent.
I ran it again, and it copied 2.

I have about 1300 torrents, and I'm not getting any error messages.

This is a sample of how the routine ends:
Code: [Select]
goroutine 1172 [semacquire]:
sync.runtime_Semacquire(0x123e8c7c)
        C:/msys64/mingw64/lib/go/src/runtime/sema.go:56 +0x2e
sync.(*WaitGroup).Wait(0x123e8c70)
        C:/msys64/mingw64/lib/go/src/sync/waitgroup.go:129 +0x7a
main.main.func1(0x123e8c70, 0x12410040, 0x12410080)
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/deluge2qbt/deluge2qbt.go:340 +0x21
created by main.main
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/deluge2qbt/deluge2qbt.go:339 +0xed4

Please help, thanks. I'm trying to migrate from deluge.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on April 29, 2019, 08:04:55 am
Hello,

I tried using the tool, but it only copied 1 torrent.
I ran it again, and it copied 2.

I have about 1300 torrents, and I'm not getting any error messages.

This is a sample of how the routine ends:
Code: [Select]
goroutine 1172 [semacquire]:
sync.runtime_Semacquire(0x123e8c7c)
        C:/msys64/mingw64/lib/go/src/runtime/sema.go:56 +0x2e
sync.(*WaitGroup).Wait(0x123e8c70)
        C:/msys64/mingw64/lib/go/src/sync/waitgroup.go:129 +0x7a
main.main.func1(0x123e8c70, 0x12410040, 0x12410080)
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/deluge2qbt/deluge2qbt.go:340 +0x21
created by main.main
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/deluge2qbt/deluge2qbt.go:339 +0xed4

Please help, thanks. I'm trying to migrate from deluge.

Hi! Thanks for bug report. I will try to fix it as fast as i can.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on April 29, 2019, 12:20:04 pm
Hello,

I tried using the tool, but it only copied 1 torrent.
I ran it again, and it copied 2.

I have about 1300 torrents, and I'm not getting any error messages.

This is a sample of how the routine ends:
Code: [Select]
goroutine 1172 [semacquire]:
sync.runtime_Semacquire(0x123e8c7c)
        C:/msys64/mingw64/lib/go/src/runtime/sema.go:56 +0x2e
sync.(*WaitGroup).Wait(0x123e8c70)
        C:/msys64/mingw64/lib/go/src/sync/waitgroup.go:129 +0x7a
main.main.func1(0x123e8c70, 0x12410040, 0x12410080)
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/deluge2qbt/deluge2qbt.go:340 +0x21
created by main.main
        C:/Users/rumanzo/eclipse-workspace/testinggo/src/deluge2qbt/deluge2qbt.go:339 +0xed4

Please help, thanks. I'm trying to migrate from deluge.
Try new version https://github.com/rumanzo/deluge2qbt/releases
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: aaaa1234 on April 29, 2019, 09:44:06 pm
Hello,

Thank you for trying to help! I tried the updated version, and it still only copied a few torrents.


Code: [Select]
goroutine 1158 [runnable]:
main.logic(0x126aea20, 0x28, 0x5, 0x0, 0x5aa151a0, 0x0, 0x0, 0x0, 0x0,
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:163
created by main.main
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:364 +0x113f

goroutine 1159 [runnable]:
main.logic(0x133523c0, 0x28, 0x3, 0x0, 0x5aa1519c, 0x0, 0x0, 0x0, 0x0,
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:163
created by main.main
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:364 +0x113f

goroutine 1160 [semacquire]:
sync.runtime_Semacquire(0x13150f08)
        /usr/lib/go/src/runtime/sema.go:56 +0x2e
sync.(*WaitGroup).Wait(0x13150f00)
        /usr/lib/go/src/sync/waitgroup.go:130 +0x7d
main.main.func1(0x13150f00, 0x124380c0, 0x12438100)
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:368 +0x21
created by main.main
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:367 +0x15d8

Sample of the end of the routine.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on May 01, 2019, 11:43:03 am
Hello,

Thank you for trying to help! I tried the updated version, and it still only copied a few torrents.


Code: [Select]
goroutine 1158 [runnable]:
main.logic(0x126aea20, 0x28, 0x5, 0x0, 0x5aa151a0, 0x0, 0x0, 0x0, 0x0,
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:163
created by main.main
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:364 +0x113f

goroutine 1159 [runnable]:
main.logic(0x133523c0, 0x28, 0x3, 0x0, 0x5aa1519c, 0x0, 0x0, 0x0, 0x0,
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:163
created by main.main
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:364 +0x113f

goroutine 1160 [semacquire]:
sync.runtime_Semacquire(0x13150f08)
        /usr/lib/go/src/runtime/sema.go:56 +0x2e
sync.(*WaitGroup).Wait(0x13150f00)
        /usr/lib/go/src/sync/waitgroup.go:130 +0x7d
main.main.func1(0x13150f00, 0x124380c0, 0x12438100)
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:368 +0x21
created by main.main
        /home/kostinan/go/src/deluge2qbt/deluge2qbt.go:367 +0x15d8

Sample of the end of the routine.
With aaaa1234 we fixed this in version 1.1
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: jeremiasb on July 13, 2019, 12:38:16 am
It worked nicely!

Thank you very much!
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 04, 2019, 12:09:35 pm
Are there any plans for a Windows Phone release? I have a friend who is interested in buying the game when it comes out, but the only system he has that hed want to play it on is Windows Phone 8.
???
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: MountainInside on August 14, 2019, 09:56:17 am
Thanks, worked great.  8)

I migrated 4000+ torrents from uTorrent (Mac) to QBittorrent (Mac), I just had to use a windows VM to convert the profile folder.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 14, 2019, 11:02:07 am
Thanks, worked great.  8)

I migrated 4000+ torrents from uTorrent (Mac) to QBittorrent (Mac), I just had to use a windows VM to convert the profile folder.
Hello! You could ask :-)
Simple modification and compilation on macos, and you can migrate.
I did not know that there was a utorrent on mac too and did not count on this target audience. I will have to deal with the issue. Only with debugging it will be more difficult - I do not have a mac.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: MountainInside on August 14, 2019, 11:13:22 am
Thanks, worked great.  8)

I migrated 4000+ torrents from uTorrent (Mac) to QBittorrent (Mac), I just had to use a windows VM to convert the profile folder.
Hello! You could ask :-)
Simple modification and compilation on macos, and you can migrate.
I did not know that there was a utorrent on mac too and did not count on this target audience. I will have to deal with the issue. Only with debugging it will be more difficult - I do not have a mac.
Many users are looking for options to move from uTorrent, as the next MacOS (coming next month) will drop support for 32-bit apps (like uTorrent) and knowing uTorrent they'll not release a 64-bit MacOS version any time soon.

I'm glad your tool exists, absolutely a lifesaver.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 14, 2019, 11:17:40 am
Thanks, worked great.  8)

I migrated 4000+ torrents from uTorrent (Mac) to QBittorrent (Mac), I just had to use a windows VM to convert the profile folder.
Hello! You could ask :-)
Simple modification and compilation on macos, and you can migrate.
I did not know that there was a utorrent on mac too and did not count on this target audience. I will have to deal with the issue. Only with debugging it will be more difficult - I do not have a mac.
Many users are looking for options to move from uTorrent, as the next MacOS (coming next month) will drop support for 32-bit apps (like uTorrent) and knowing uTorrent they'll not release a 64-bit MacOS version any time soon.

I'm glad your tool exists, absolutely a lifesaver.
May I ask you to help me with debug?
Can you tell me where on Mac user profiles, and where are the files of the utorrent and qbittorrent?
And maybe in the evening there will be a working tool for mac
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: MountainInside on August 14, 2019, 07:56:49 pm
Thanks, worked great.  8)

I migrated 4000+ torrents from uTorrent (Mac) to QBittorrent (Mac), I just had to use a windows VM to convert the profile folder.
Hello! You could ask :-)
Simple modification and compilation on macos, and you can migrate.
I did not know that there was a utorrent on mac too and did not count on this target audience. I will have to deal with the issue. Only with debugging it will be more difficult - I do not have a mac.
Many users are looking for options to move from uTorrent, as the next MacOS (coming next month) will drop support for 32-bit apps (like uTorrent) and knowing uTorrent they'll not release a 64-bit MacOS version any time soon.

I'm glad your tool exists, absolutely a lifesaver.
May I ask you to help me with debug?
Can you tell me where on Mac user profiles, and where are the files of the utorrent and qbittorrent?
And maybe in the evening there will be a working tool for mac

I'm happy to help, thank you for your interest  :)

uTorrent: (equivalent to %appdata%\uTorrent in Windows)
Code: [Select]
~/Library/Application Support/uTorrent
QBittorrent: (equivalent to %localappdata%\QBittorrent in Windows)
Code: [Select]
~/Library/Application Support/QBittorrent
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 14, 2019, 08:07:01 pm
Thanks, worked great.  8)

I migrated 4000+ torrents from uTorrent (Mac) to QBittorrent (Mac), I just had to use a windows VM to convert the profile folder.
Hello! You could ask :-)
Simple modification and compilation on macos, and you can migrate.
I did not know that there was a utorrent on mac too and did not count on this target audience. I will have to deal with the issue. Only with debugging it will be more difficult - I do not have a mac.
Many users are looking for options to move from uTorrent, as the next MacOS (coming next month) will drop support for 32-bit apps (like uTorrent) and knowing uTorrent they'll not release a 64-bit MacOS version any time soon.

I'm glad your tool exists, absolutely a lifesaver.
May I ask you to help me with debug?
Can you tell me where on Mac user profiles, and where are the files of the utorrent and qbittorrent?
And maybe in the evening there will be a working tool for mac

I'm happy to help, thank you for your interest  :)

uTorrent: (equivalent to %appdata%\uTorrent in Windows)
Code: [Select]
~/Library/Application Support/uTorrent
QBittorrent: (equivalent to %localappdata%\QBittorrent in Windows)
Code: [Select]
~/Library/Application Support/QBittorrent
Please tell me the equivalent of the path %AppData%\ qBittorrent where qBittorrent.ini is located
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: MountainInside on August 14, 2019, 08:51:40 pm
Thanks, worked great.  8)

I migrated 4000+ torrents from uTorrent (Mac) to QBittorrent (Mac), I just had to use a windows VM to convert the profile folder.
Hello! You could ask :-)
Simple modification and compilation on macos, and you can migrate.
I did not know that there was a utorrent on mac too and did not count on this target audience. I will have to deal with the issue. Only with debugging it will be more difficult - I do not have a mac.
Many users are looking for options to move from uTorrent, as the next MacOS (coming next month) will drop support for 32-bit apps (like uTorrent) and knowing uTorrent they'll not release a 64-bit MacOS version any time soon.

I'm glad your tool exists, absolutely a lifesaver.
May I ask you to help me with debug?
Can you tell me where on Mac user profiles, and where are the files of the utorrent and qbittorrent?
And maybe in the evening there will be a working tool for mac

I'm happy to help, thank you for your interest  :)

uTorrent: (equivalent to %appdata%\uTorrent in Windows)
Code: [Select]
~/Library/Application Support/uTorrent
QBittorrent: (equivalent to %localappdata%\QBittorrent in Windows)
Code: [Select]
~/Library/Application Support/QBittorrent
Please tell me the equivalent of the path %AppData%\ qBittorrent where qBittorrent.ini is located

It's located here:
Code: [Select]
~/.config/qBittorrent/qbittorrent.ini
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 14, 2019, 09:34:40 pm
It's located here:
Code: [Select]
~/.config/qBittorrent/qbittorrent.ini
Can you try this release? It definitely must work if set paths forcely, and must be right defaults (macos case sensitive?) if nothing is specified

https://github.com/rumanzo/bt2qbt/releases/download/v1.1/bt2qbt_v1.1_amd64_macos
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: MountainInside on August 14, 2019, 10:24:06 pm
It's located here:
Code: [Select]
~/.config/qBittorrent/qbittorrent.ini
Can you try this release? It definitely must work if set paths forcely, and must be right defaults (macos case sensitive?) if nothing is specified

https://github.com/rumanzo/bt2qbt/releases/download/v1.1/bt2qbt_v1.1_amd64_macos

Worked great!!

I just had to chmod 755 the file

Quote
Last login: Wed Aug 14 23:49:47 on ttys000
Mac-mini:~ test$ chmod 755 /Users/test/Desktop/bt2qbt_v1.1_amd64_macos
Mac-mini:~ test$ /Users/test/Desktop/bt2qbt_v1.1_amd64_macos 
It will be performed processing from directory /Users/test/Library/Application Support/uTorrent/ to directory /Users/test/Library/Application Support/QBittorrent/BT_backup/
Check that the qBittorrent is turned off and the directory /Users/test/Library/Application Support/QBittorrent/BT_backup/ and config /Users/test/.config/qBittorrent/qbittorrent.ini is backed up.

Press Enter to start

2019/08/15 00:11:27 Started
1/4 Sucessfully imported ubuntu-19.04-server-amd64.iso.torrent 
2/4 Sucessfully imported ubuntu-19.04-server-s390x.iso.torrent 
3/4 Sucessfully imported ubuntu-19.04-server-ppc64el.iso.torrent 
4/4 Sucessfully imported ubuntu-19.04-server-arm64.iso.torrent 

2019/08/15 00:11:27 Ended

Press Enter to exit

Screenshots: https://imgur.com/a/k9unvAG (https://imgur.com/a/k9unvAG)
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 14, 2019, 10:26:45 pm
It's located here:
Code: [Select]
~/.config/qBittorrent/qbittorrent.ini
Can you try this release? It definitely must work if set paths forcely, and must be right defaults (macos case sensitive?) if nothing is specified

https://github.com/rumanzo/bt2qbt/releases/download/v1.1/bt2qbt_v1.1_amd64_macos

Worked great!!

I just had to chmod 755 the file

Quote
Last login: Wed Aug 14 23:49:47 on ttys000
Mac-mini:~ test$ chmod 755 /Users/test/Desktop/bt2qbt_v1.1_amd64_macos
Mac-mini:~ test$ /Users/test/Desktop/bt2qbt_v1.1_amd64_macos
It will be performed processing from directory /Users/test/Library/Application Support/uTorrent/ to directory /Users/test/Library/Application Support/QBittorrent/BT_backup/
Check that the qBittorrent is turned off and the directory /Users/test/Library/Application Support/QBittorrent/BT_backup/ and config /Users/test/.config/qBittorrent/qbittorrent.ini is backed up.

Press Enter to start

2019/08/15 00:11:27 Started
1/4 Sucessfully imported ubuntu-19.04-server-amd64.iso.torrent
2/4 Sucessfully imported ubuntu-19.04-server-s390x.iso.torrent
3/4 Sucessfully imported ubuntu-19.04-server-ppc64el.iso.torrent
4/4 Sucessfully imported ubuntu-19.04-server-arm64.iso.torrent

2019/08/15 00:11:27 Ended

Press Enter to exit

Screenshots: https://imgur.com/a/k9unvAG (https://imgur.com/a/k9unvAG)
Awesome! Thanks for help
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: Nemo on August 15, 2019, 06:03:50 pm
Thanks for your efforts guys.
Title: Re: Windows tool for migration from Bittorrent/uTorrent/Deluge to qBittorrent
Post by: rumanzo on August 15, 2019, 06:16:19 pm
Thanks for your efforts guys.
Hi! I would like to ask you to pin similar topics in the sections with Linux (deluge branch, I guess) and MacOS (I can arrange the corresponding topics) linked to this topic.
And in useful ones it would be very cool to pin a utility for changing trackers in batch mode, apparently this is the cool tool, people found her through a search and thanked her for the time saved.