"Run an external program..." parameters

Other platforms, generic questions.
Post Reply
brewmasterofnone

"Run an external program..." parameters

Post by brewmasterofnone »

I know that the supported parameters for Run an external program on torrent completion are:
  • %f: Torrent path
  • %n: Torrent name
But I haven't been able to find any details about what the values are exactly (the wiki documentation hasn't been updated yet).

Is the torrent path always going to be the location specified by Save files to location? If the Append the label of the torrent to the save path checkbox is checked, will the label be in the %f value?

Is the torrent name going to be the name of the torrent file (i.e. sometorrent.torrent), or will it be the file name without the .torrent extension, or something else altogether?

Thank you in advance for your help
wreckedred

Re: "Run an external program..." parameters

Post by wreckedred »

I am looking for this information too...how do I/we take advantage of this parameter?
wreckedred

Re: "Run an external program..." parameters

Post by wreckedred »

Assuming you are using bash you could use the feature like this

Put script that you want to run in the after the torrent completes

Example:
sh /home/me/scripts/qbit.sh "%n"

In your script call the %n

Example:
#!/bin/sh
tname=$1
echo $tname

You could do anything you like with the $tname
crosenblum

Re: "Run an external program..." parameters

Post by crosenblum »

Has anyone used this to run a bash script to move completed downloads? If so, how does one get what label that download has?

I myself have been running bash scripts, that grab from each label inside my completed download's folder, to move files to a central processing folder.

But i still seem to grab incomplete downloads with the complete downloads.

So is there a better way to identify completed downloads and move them,  and grab what label they had?

For example, I want to move movies into a different folder than i want to move tv shows.

Then i have scripts that i am working on to automate renaming of folders/files but it helps if i can have 1 folder for movies, and another for tv shows.
Post Reply