I'm trying to determine a way to make the execute plugin run a different script based on the torrent tracker.
Is there any way to identify torrents with the execute plugin by the tracker?
Thanks
Execute plugin: script per tracker?
Re: Execute plugin: script per tracker?
Afraid not you would need to run a deluge client script to connect to deluge and get that information. A hacky workaround could use the label plugin to put torrents in trackers specific folders.
Re: Execute plugin: script per tracker?
How can I do that ? Thanks !A hacky workaround could use the label plugin to put torrents in trackers specific folders.
Re: Execute plugin: script per tracker?
In the label options
Re: Execute plugin: script per tracker?
Oh man, the label idea works perfect.
My execute script looks at the completed path of the torrent and with an IF statement in bash, decides where to move the data.
This whole thing revolves around a finished torrent getting copied to a remove server and put into the proper folder for assimilation into the plexmediaserver upon finishing.
If anyone is curious, see my bash script below:
Also, this works with SCP because i'm using a ssh config file
My execute script looks at the completed path of the torrent and with an IF statement in bash, decides where to move the data.
This whole thing revolves around a finished torrent getting copied to a remove server and put into the proper folder for assimilation into the plexmediaserver upon finishing.
If anyone is curious, see my bash script below:
Also, this works with SCP because i'm using a ssh config file
Code: Select all
$ cat ~/.ssh/config
Host newserver
Hostname newserver.example.com
User deluge
IdentityFile ~/.ssh/deluge-userkey.ssh
Port 22
Code: Select all
#!/bin/bash
varID=$1
varTORRENTNAME=$2
varTORRENTPATH=$3
varTORRENT="$varTORRENTPATH/$varTORRENTNAME"
varLOGPATH='/home/deluge/.log'
varEXECLOG='execute.log'
varCMDLOG='command.log'
varHOSTNAME='newserver:'
fnSCP () {
scp -q -r $varTORRENT $varHOSTNAME$varHOSTPATH &
}
fnLOG () {
varDATE="$(date +%Y-%m-%d\ %H:%M:%S)"
echo -e "[$varDATE] ID: $varID" "\t" "Name: $varTORRENTPATH/$varTORRENTNAME" >> $varLOGPATH/$varEXECLOG
echo -e "[$varDATE] scp -q -r $varTORRENT $varHOSTNAME$varHOSTPATH &" >> $varLOGPATH/$varCMDLOG
}
if [[ $varTORRENT =~ ./tv/.* ]]; then
varHOSTPATH='~/tv/'
fnLOG
fnSCP
elif [[ $varTORRENT =~ ./movies/.* ]]; then
varHOSTPATH='~/movies/'
fnLOG
fnSCP
else
varHOSTPATH='~/'
fnSCP
fi
Re: Execute plugin: script per tracker?
But its only the complete folder right ?
And if you can get both type from the same tracker ? How to do that ?
And if you can get both type from the same tracker ? How to do that ?
Re: Execute plugin: script per tracker?
I see no other way than either manually moving them to a different label or completed folder