Automatically adding torrents with a specified path

Specific support for Deluge on Microsoft Windows OS
Post Reply
Toresh
New User
New User
Posts: 3
Joined: Mon Jul 30, 2018 9:37 pm

Automatically adding torrents with a specified path

Post by Toresh »

Hi,
I am trying to replace uTorrent with Deluge and I would like to know if I add a torrent via e.g.

Code: Select all

deluge-console.exe add --path="C:\Temp\Torrents" SomeTorrent.torrent
and the torrent has a top folder, will the specify path be added to it or it will replace it?
i.e. will it be C:\Temp\Torrents\SubFolder or C:\Temp\Torrents\TopFolder\SubFolder?

Thanks
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Automatically adding torrents with a specified path

Post by mhertz »

Added to it(retains original structure).

Btw, if you wanna change this behaviour, so either never use a topfolder, or alternatively always add a topfolder if missing(for single files without one), then there's a plugin(NoFolder) for either of that functionality, here:

viewtopic.php?f=9&t=51839

I just made a small fix to that a few days ago so it also supports magnets now, so i'd recommend using my fixed build linked in last post of above thread.
Toresh
New User
New User
Posts: 3
Joined: Mon Jul 30, 2018 9:37 pm

Re: Automatically adding torrents with a specified path

Post by Toresh »

Nice, thanks you :)
I quickly tested and it's working great.
I added a torrent to a folder with spaces and I had to replace them with ' '. Is there any other way to add a path with spaces?
Also, would it be possible to not change the name of the torrent in the GUI, just remove it from the path? It's not a big problem, but I would prefer to see the name of the torrent instead of the 1st file.
I am receiving the path and the torrent file from another program and I can't easily manipulate those.

Thanks :)
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Automatically adding torrents with a specified path

Post by mhertz »

You're welcome :)

About your questions, i'm sorry for being little slow here, but I don't understand fully :) Are you talking about 'deluge-console add -p 'folder with space' foo.torrent'. In that case, then on linux you can use globbing, so 'deluge-console add -p folder* foo.torrent', but that is probably the shell expanding those globs and so not available in windows command-prompt(atleast not 10 years ago when I last dabbled in windows) - I know deluge has some globbing built-in too, but i'm guessing it's the shell here(zsh/bash etc), but not 100% sure.

The changing of torrent-name in GUI is a known issue of that plugin sorry and I don't know how to fix sorry(I don't even use that plugin either :) ).

If you don't seed, although "rude", then you can make an execute script which drops the top-folder afterwards, but again, I don't know at top of my head how it's done on windows.

If you tell me what app you're trying to integrate with deluge-console, then maybe I can help you better?
Toresh
New User
New User
Posts: 3
Joined: Mon Jul 30, 2018 9:37 pm

Re: Automatically adding torrents with a specified path

Post by Toresh »

Yes I would like to add via the console:

Code: Select all

deluge-console.exe --path="C:\Torrents\Some Folder With Spaces" SomeTorrentFile.torrent
The top folder is removed if I use the plugin so it's working great.
I need to replace the spaces in the path to "C:\Torrents\Some' 'Folder' 'With' 'Spaces" but I could call a script file instead of deluge directly to modify the path and call deluge with the modified path.
The path may not exists before I add the torrent to deluge and the name shown is not really a problem, just a small annoyance :)
Again, thanks for your help
Post Reply