Migrate uTorrent to Deluge

Suggestions and discussion of future versions
User avatar
Cha0s
Member
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am
OS or Distro: None

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

Postby Cha0s » Tue Sep 16, 2014 5:22 pm

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.

User avatar
Cha0s
Member
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am
OS or Distro: None

Re: Migrate uTorrent to Deluge

Postby Cha0s » Fri Oct 03, 2014 9:35 am

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
New User
Posts: 4
Joined: Tue Jul 01, 2014 7:49 pm
OS or Distro: Win7/Linux Mint

Re: Migrate uTorrent to Deluge

Postby Raen » Fri Jan 16, 2015 4:57 pm

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.

I encountered one issue though, torrents which download paths contain spaces will be added with incomplete download paths. For example, if you have a torrent with the download path "C:\PC Games\" it will be added with "C:\PC" as the download path, and obviously, deluge will return 0% when checking for files.
The same happens with folders with ".", "-" and "_" for example, the path gets broken at those characters.

User avatar
Cha0s
Member
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am
OS or Distro: None

Re: Migrate uTorrent to Deluge

Postby Cha0s » Mon Jan 19, 2015 12:03 pm

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
New User
Posts: 3
Joined: Wed Aug 27, 2014 1:21 pm
OS or Distro: windows 8.1

Re: Migrate uTorrent to Deluge

Postby raffamaiden » Sun Jan 25, 2015 1:30 am

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 198 times

fallenturtle
New User
New User
Posts: 1
Joined: Tue Mar 10, 2015 12:47 am
OS or Distro: Windows 7

Re: Migrate uTorrent to Deluge

Postby fallenturtle » Tue Mar 10, 2015 1:01 am

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
New User
New User
Posts: 1
Joined: Sat Apr 18, 2015 10:42 pm
OS or Distro: Win7

Re: Migrate uTorrent to Deluge

Postby Aeko » Sun Apr 19, 2015 12:21 am

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
New User
New User
Posts: 1
Joined: Tue Apr 28, 2015 10:46 am
OS or Distro: Windows 8.1/Debian

Re: Migrate uTorrent to Deluge

Postby justextreme » Tue Apr 28, 2015 10:47 am

Just registered to say thank you so much for this script :)

roisiano
New User
New User
Posts: 3
Joined: Sat Oct 21, 2017 9:03 am
OS or Distro: Ubuntu

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

Postby roisiano » Sat Oct 21, 2017 9:11 am

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.

User avatar
Cha0s
Member
Member
Posts: 24
Joined: Sun Dec 28, 2008 10:48 am
OS or Distro: None

Re: Migrate uTorrent to Deluge

Postby Cha0s » Sat Oct 21, 2017 12:15 pm

I have uploaded the script to GitHub so it won't get 'lost' again :)
https://github.com/RLoaD/utorrent-to-deluge

I don't know if it still works or not though. I haven't used Deluge for ages (too slow UI for my amount of torrents)
During times of universal deceit, telling the truth becomes a revolutionary act.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 4 guests