Page 4 of 5

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

Posted: Tue Sep 16, 2014 5:22 pm
by Cha0s
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.

Re: Migrate uTorrent to Deluge

Posted: Fri Oct 03, 2014 9:35 am
by Cha0s
There was a problem with my server. Those trying to download my script you can try again now :)

Re: Migrate uTorrent to Deluge

Posted: Fri Jan 16, 2015 4:57 pm
by Raen
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.

Re: Migrate uTorrent to Deluge

Posted: Mon Jan 19, 2015 12:03 pm
by Cha0s
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.

Re: Migrate uTorrent to Deluge

Posted: Sun Jan 25, 2015 1:30 am
by raffamaiden
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 :)

Re: Migrate uTorrent to Deluge

Posted: Tue Mar 10, 2015 1:01 am
by fallenturtle
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.

Re: Migrate uTorrent to Deluge

Posted: Sun Apr 19, 2015 12:21 am
by Aeko
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!

Re: Migrate uTorrent to Deluge

Posted: Tue Apr 28, 2015 10:47 am
by justextreme
Just registered to say thank you so much for this script :)

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

Posted: Sat Oct 21, 2017 9:11 am
by roisiano
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 ( http://forum.deluge-torrent.org/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.

Re: Migrate uTorrent to Deluge

Posted: Sat Oct 21, 2017 12:15 pm
by Cha0s
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)