Problem with mass adding my torrents in Deluge

General support for problems installing or using Deluge
death_is_invtbl
New User
New User
Posts: 6
Joined: Fri Sep 20, 2019 8:12 pm

Problem with mass adding my torrents in Deluge

Postby death_is_invtbl » Fri Sep 20, 2019 8:19 pm

hi guys,

I need to add ±10 000 000 000 torrents and:

1) I have .torrent files in folders and need to open it in deluge
2) after that I need to select the folder to download (this will be the file location folder)

I'm tryin to do it:

find /media/username/DISK02/folder1/ -type f -name "*.torrent" -exec bash -c 'deluge-console \'add -p \"$(dirname "{}")\" \""{}"\"\'' \;

but it is not workin', please, help :oops:

mhertz
Compulsive Poster
Compulsive Poster
Posts: 1097
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Problem with mass adding my torrents in Deluge

Postby mhertz » Sat Sep 21, 2019 12:05 am

That's a lot of torrents there, lol! :) Anyway, the closest I've come is the following, but won't work if having spaces in the directory-names, because deluge-console, as far as I could test, doesn't support adding download-path with spaces from command-line(I tried without 'find' too and by itself in various quote/backslash variations):

Code: Select all

find /media/username/DISK02/folder1/ -type f -name "*.torrent" -exec bash -c 'deluge-console add --path "$(dirname "{}")" "{}"' \;

mhertz
Compulsive Poster
Compulsive Poster
Posts: 1097
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Problem with mass adding my torrents in Deluge

Postby mhertz » Sat Sep 21, 2019 2:13 pm

Sorry, had another go at it and deluge-console does in fact support spaces, and I believe the following works now, as it did with a couple of tests I made with both dirs and torrents with and without spaces in there names:

Code: Select all

find /media/username/DISK02/folder1/ -type f -name "*.torrent" -exec bash -c 'deluge-console "add -p \"$(dirname "{}")\" \"{}\""' \;

death_is_invtbl
New User
New User
Posts: 6
Joined: Fri Sep 20, 2019 8:12 pm

Re: Problem with mass adding my torrents in Deluge

Postby death_is_invtbl » Sun Sep 22, 2019 6:55 pm

mhertz wrote:Sorry, had another go at it and deluge-console does in fact support spaces, and I believe the following works now, as it did with a couple of tests I made with both dirs and torrents with and without spaces in there names:

Code: Select all

find /media/username/DISK02/folder1/ -type f -name "*.torrent" -exec bash -c 'deluge-console "add -p \"$(dirname "{}")\" \"{}\""' \;


is not working :(

mhertz
Compulsive Poster
Compulsive Poster
Posts: 1097
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Problem with mass adding my torrents in Deluge

Postby mhertz » Sun Sep 22, 2019 8:10 pm

What exactly is the error? I just tried it again where I made two dirs, one with a dirname with spaces and a torrent inside without spaces, and another dir without spaces and a torrent inside with spaces, to cover everything pretty much i'd presume, and here's a screenshot of it working:
screenshot.png
screenshot.png (196.84 KiB) Viewed 817 times

I renamed an arch and a debian iso torrent so that is why the downloaded content is named like that, and I only changed the source-dir for 'find' from yours to mine i.e. '~/Downloads'.

Also, the screenshot is in zsh shell, which shouldn't matter since using bash as shell for the 'find' command output, but I also rerun it in bash afterwards with same result.)


Return to “Support”

Who is online

Users browsing this forum: No registered users and 18 guests