How to download multiple torrent links using transmission-daemon?

Solution 1:

This will do the job.

For .torrent files:

First, you need to upload the .torrent files to a directory on your server. Then, please follow the steps below:

  • Open a terminal and make sure you cd to the directory containing the .torrent files.

  • To add a single .torrent file to transmission-daemon, please run the following command in the terminal:

transmission-remote -n 'transmission:transmission' -a torrent_file_name.torrent
  • To add all .torrent files in the directory to transmission-daemon, please run the following command in the terminal:
find . -maxdepth 1 -type f -name '*.torrent' -exec transmission-remote -n 'transmission:transmission' -a {} \;

For magnet URLs:

  • Create a file and name it magnet.links and add the magnet URLs one per line to the file. Please avoid crating any blank lines. Add the first link in the first line and then press Enter then add the second link in the second line and so on. Do not press Enter after the last line, just save the file and exit.

  • Open a terminal and cd to the directory that contains the magnet.links file.

  • Copy and paste the following code in the terminal and press Enter:

file="magnet.links"
while IFS= read -r line
do
transmission-remote -n 'transmission:transmission' -a $line
done <"$file"