Open GoogleCodeExporter opened 9 years ago
doesnt work 100% of the time if anyone wants to clean up.
Its a nasty hack but this is how ive got around this queue problem. Create a
queue folder, when a torrent completes move at random file from queue to
torrentwatch by updating
/var/transmission/.config/transmission-daemon/settings.json
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/usb/{your directories}/torrentend.sh",
torrentend.sh
#! /bin/sh
dir='/var/transmission/queue'
n_files=`/bin/ls -1 "$dir" | wc -l | cut -f1`
if test $n_files -ne 0
then
rand_num=`awk "BEGIN{srand();print int($n_files * rand()) + 1;}"`
file=`/bin/ls -1 "$dir" | sed -ne "${rand_num}p"`
path=`cd $dir && echo "$PWD/$file"` # Converts to full path.
echo "The randomly-selected file is: $path"
logger $path copied to torrentwatch folder
mv $path /var/transmission/torrentwatch
fi
logger $1 completed
Original comment by g1p...@gmail.com
on 10 Oct 2011 at 11:03
Original issue reported on code.google.com by
psych...@gmail.com
on 26 Sep 2011 at 3:06