## Migrate uTorrent to Deluge

Suggestions and discussion of future versions
Cha0s
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am

### Re: Help on Script to auto add torrents from uTorrent/BitTor

greenwich wrote:@Raen:
Could php version might have something to do with it?
I have these installers of PHP saved: php-5.3.23-Win32-VC9-x86.msi
and php-5.2.17-nts-Win32-VC6-x86.msi
(I've re-installed the OS since then)

It's not a PHP version issue.

Most likely deluged.exe is not running that's why it wouldn't add any torrents to Deluge.
During times of universal deceit, telling the truth becomes a revolutionary act.

Cha0s
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am

### Re: Migrate uTorrent to Deluge

There was a problem with my server. Those trying to download my script you can try again now
During times of universal deceit, telling the truth becomes a revolutionary act.

Raen
New User
Posts: 4
Joined: Tue Jul 01, 2014 7:49 pm

### Re: Migrate uTorrent to Deluge

Cha0s, thanks for the updated version of your script.

I just gave it a run, and indeed delugeg.exe needs to be running for the torrents to be added.

The same happens with folders with ".", "-" and "_" for example, the path gets broken at those characters.

Cha0s
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am

Hello,

Can you re-run the script but with $DRYRUN = TRUE; in settings.php ? And then paste the output here. I believe the error might be in the command passed to deluge-console.exe because there are 2 conditions before that to check if the folder actually exists so if those checks pass, then the download path should exist and be correct. Unfortunately I am not able to test this now on my PC. During times of universal deceit, telling the truth becomes a revolutionary act. raffamaiden New User Posts: 3 Joined: Wed Aug 27, 2014 1:21 pm ### Re: Migrate uTorrent to Deluge I modified your script a bit I used single quotes in the command line since with double quotes filename with spaces didn't work. I also pure the quote correctly outside the add and only in the path I changed exec to passthru so it can pass deluge output to command line. I also tried to check for the returned result but deluge-console.exe seems to return always 0 no matter what. BTW it checks correctly for command line errors at least I still have problems with special characters in the filenames, like ^ and & EDIT: I don't know why, i just discovered that to put a single ^ you need to pass two ^^, so ^^ get converted to one ^ ^.^ EDIT2: There's absolutely something very nasty going on in the way deluge processes path from command lines. '\' are converted into '\\' (why? you have to choose if accept escape characters or not, without staying in the middle) nad torrents doesn't start in deluge, it tells me that "The filename, directory name, or volume label syntax is incorrect: Z:\\AAA\\BBB\\XXX\III\AAA.exe" Note how the \\ and \ are mixed up EDIT 3: It seems I was able to work all the issues around and repacked it. The torrent file is now copied over a temporary file before adding it, this should avoid all the unecessary filename "handling" of deluge-console.exe. Also \\ are turned into / and I used php function to extract the pathname Attachments utorrent-to-deluge.7z (1.77 KiB) Downloaded 250 times fallenturtle ### Re: Migrate uTorrent to Deluge Hi, thanks to everyone for this script, its just what I was looking for. I'm just trying a dry run right now and I'm getting a lot of "{ERROR} .torrent file missing". I think something is going odd with the path (the torrent files do exist): Torrent File: C:\Users\abailey\AppData\Roaming\uTorrent\E:\\Transfer\\Transfering\\dot_torrent files\\torrentname.torrent Does this script not work if the .torrent files aren't stored in the Roaming\uTorrent directory? I've tried both the original 0.2 windows version as well as with raffamaiden's modifications. Thanks. Aeko ### Re: Migrate uTorrent to Deluge I just migrated to Deluge and tried to use the script v0.2, but it failed. I found two problems with it: 1) The torrent path it determined was something like "C:\Users\Me\Roaming\uTorrent\E:\Downloads", just like fallenturtle above me. 2) After the above error was fixed, the client added the torrents but complained that e.g "E:\\Downloads\\example.exe" (note the double slashes) didn't exist for every file, even though the call to the console executable was being done with single slashes and I was able to open any file from the Files tab of the torrent, which proved Deluge knew the correct path. Anyways, the solution to 2) was raffamaiden's version. And after downloading it, to solve 1), I had to replace the line: Code: Select all $TORRENT_PATH = $BITTORRENT_PATH . "\\" .$key;

With this one:

Code: Select all

$TORRENT_PATH = str_replace("\\\\", "\\",$key);

Which gets rid of the \$BITTORRENT_PATH variable which was incorrect for me (maybe it assumes that the torrent folder is a relative path inside Roaming\uTorrent?) and also replaces any double slash it finds with a single slash.

After that it worked like a charm. I hope this helps somebody. Thanks to both of the coders for the script!

justextreme

### Re: Migrate uTorrent to Deluge

Just registered to say thank you so much for this script

roisiano
New User
Posts: 3
Joined: Sat Oct 21, 2017 9:03 am

### Re: Help on Script to auto add torrents from uTorrent/BitTor

Hi:

I'm trying to migrate my torrents (more than 700 on different locations/foders) (most of them from private trackers with ratio requirements) from Utorrent 2.2.1 (Windows 7) to the last version of Deluge (Ubuntu 16.04).

I've tried first using utorrent import filter for Deluge ( viewtopic.php?t=52145 ), but it only works for me when I try to migrate from utorrent to Deluge in Windows, but not when I try to migrate to Deluge in Ubuntu.
Most of the torrents are located in Windows 7 drive folders or in other internal or external HDD drives without Operating System (NFTS).
I'm sharing 5 TB of files in torrents, more or less.

So, I'm interested in this script to try to import torrents to Ubuntu:

Cha0s wrote:Since, it seems to be an interest on the script I wrote to migrate from uTorrent/BitTorrent to Deluge/Transmission you can download it from here:

Linux (OLD) version
http://www.cha0s.gr/utorrent-to-deluge.rar

But it seems that it is not available.

Could anyone share it again?

Other alternative could be migrating torrents from Deluge in Windows 7 to Deluge in Ubuntu 16.04.

Could anyone help me?

Thanks in advance and kind regards.

Cha0s
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am

### Re: Migrate uTorrent to Deluge

I have uploaded the script to GitHub so it won't get 'lost' again